/* Gameplay owns its viewport. The lobby and sign-in fallback keep the normal site shell. */
html.jsv-game-viewport-fallback,
html body.jsv-game-viewport-page.jsv-game-viewport-fallback {
  position: static !important;
  inset: auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
html body.jsv-game-viewport-page.jsv-game-viewport-fallback :is(#jsv-primary-header),
html body.jsv-game-viewport-page.jsv-game-viewport-fallback > .top { display: flex !important; }
html.jsv-game-viewport-active,
html:has(body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure) {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}
html body.jsv-game-viewport-page.jsv-game-viewport-active,
html body.jsv-game-viewport-page:has(#jsf-niagara-game.jsf-ng-adventure) {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: none !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}
html body.jsv-game-viewport-page.jsv-game-viewport-active :is(#jsv-primary-header),
html body.jsv-game-viewport-page:has(#jsf-niagara-game.jsf-ng-adventure) :is(#jsv-primary-header),
html body.jsv-game-viewport-page.jsv-game-viewport-active > :is(.top,.mobilebar,.site-footer,.jsv-x-rail,.jsv-x-backdrop),
html body.jsv-game-viewport-page:has(#jsf-niagara-game.jsf-ng-adventure) > :is(.top,.mobilebar,.site-footer,.jsv-x-rail,.jsv-x-backdrop) {
  display: none !important;
}
html body.jsv-game-viewport-page.jsf-gameplay-atlas-page #jsf-niagara-game.jsf-ng-adventure.jsf-ng-game-v2 {
  position: fixed !important;
  inset: var(--jsv-game-top, 0px) auto auto var(--jsv-game-left, 0px) !important;
  width: var(--jsv-game-width, 100%) !important;
  min-width: 0 !important;
  max-width: none !important;
  height: var(--jsv-game-height, 100vh) !important;
  height: var(--jsv-game-height, 100dvh) !important;
  min-height: 0 !important;
  max-height: var(--jsv-game-height, 100dvh) !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  translate: none !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) clamp(300px, 24vw, 360px) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure :is(.jsf-ng-stage,.jsf-ng-map-shell,.jsf-ng-map-viewport,.jsf-ng-real-map) {
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure :is(.jsf-ng-app-rail,.jsf-ng-hunt-rail) {
  min-height: 0 !important;
  max-height: 100% !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-app-rail {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-app-rail nav {
  min-height: 0;
  overflow-y: auto;
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-hunt-rail {
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto !important;
  scroll-padding-block: 54px 16px;
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-layer-legend > div {
  max-height: max(100px, min(400px, calc(var(--jsv-game-height, 100dvh) - 130px)));
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-dialog-card {
  min-height: 0;
  max-height: calc(100% - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html body.jsv-game-viewport-page .jth-city-dialog {
  max-height: calc(var(--jsv-game-dialog-height, 100dvh) - 24px);
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsv-game-tools-toggle[hidden] { display: none !important; }

@media (min-width: 901px) and (max-width: 1200px) {
  html body.jsv-game-viewport-page.jsf-gameplay-atlas-page #jsf-niagara-game.jsf-ng-adventure.jsf-ng-game-v2 {
    grid-template-columns: 64px minmax(0, 1fr) 292px !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-map-toolbar { left: 12px; right: 122px; }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-toolbar-row {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 155px);
  }
}

@media (max-width: 900px) {
  html body.jsv-game-viewport-page.jsf-gameplay-atlas-page #jsf-niagara-game.jsf-ng-adventure.jsf-ng-game-v2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-map-toolbar {
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    max-width: none;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-back-activity {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-region-picker {
    width: calc(100% - 164px);
    min-width: 0;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.has-city-controls .jsf-ng-region-picker {
    width: calc(100% - 112px);
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-layer-legend {
    top: calc(60px + env(safe-area-inset-top, 0px)) !important;
    right: calc(120px + env(safe-area-inset-right, 0px)) !important;
    width: 44px !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-layer-legend summary { padding: 0; min-height: 44px; }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-layer-legend summary > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-layer-legend > div {
    right: -112px;
    max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-mobile-hunt-toggle {
    top: calc(60px + env(safe-area-inset-top, 0px)) !important;
    width: 104px !important;
    height: 44px !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-action-dock {
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-zoom {
    bottom: calc(94px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-zoom button[data-ng-zoom-fit] { height: 44px !important; }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-hunt-rail {
    inset: auto max(8px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)) !important;
    max-height: calc(100% - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure .jsf-ng-dialog {
    padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }

  /* Landscape and keyboard-sized viewports keep a clear map and 44px controls.
     Search, geography and filters remain one tap away in a scrollable shelf. */
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-back-activity {
    width: 44px !important;
    left: max(8px, env(safe-area-inset-left, 0px)) !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-back-activity > span { display: none; }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsv-game-tools-toggle {
    position: absolute;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: calc(60px + env(safe-area-inset-left, 0px));
    z-index: 735;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    min-height: 44px;
    padding: 8px;
    border: 1px solid #cbd9e5;
    border-radius: 11px;
    background: #fff;
    color: #143653;
    font: 700 12px/1.2 system-ui, sans-serif;
    box-shadow: 0 3px 10px #16385216;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-mobile-hunt-toggle {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
    width: 96px !important;
    font-size: 10px;
    gap: 3px;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-layer-legend {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
    left: calc(168px + env(safe-area-inset-left, 0px)) !important;
    right: auto !important;
    width: 44px !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-layer-legend > div { right: auto; left: -120px; }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-map-toolbar {
    top: calc(60px + env(safe-area-inset-top, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    max-width: 660px;
    max-height: calc(100% - 144px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 10px;
    gap: 8px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #cbd9e5;
    border-radius: 12px;
    background: #f6f9fc;
    box-shadow: 0 10px 24px #14365229;
    pointer-events: auto;
    visibility: hidden;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short.jsv-game-tools-open .jsf-ng-map-toolbar { visibility: visible; }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-toolbar-row {
    grid-template-columns: minmax(0, 1fr);
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-map-search { margin: 0; width: 100% !important; }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short :is(.jsf-ng-region-picker,.jsf-ng-city-controls) {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-category-filters button { min-height: 44px; }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-action-dock {
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    width: calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) !important;
    height: 60px !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-zoom {
    grid-template-columns: repeat(3, 44px) !important;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-hunt-rail {
    height: calc(100% - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  }
}
@media (min-width: 600px) and (max-width: 900px) {
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-toolbar-row {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 190px);
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-action-dock {
    left: calc(50% - 70px) !important;
    width: min(460px, calc(100% - 190px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))) !important;
  }
  html body.jsv-game-viewport-page #jsf-niagara-game.jsf-ng-adventure.jsv-game-short .jsf-ng-zoom {
    bottom: max(24px, env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* JS Treasure Hunt 3.0.3 approved map: the canvas spans behind floating adventure controls. */
html body.jsv-game-viewport-page.jsf-gameplay-atlas-page #jsf-niagara-game.jsf-ng-adventure.jsf-ng-game-v2.jsv-game-immersive{
 --jsv-game-panel-width:clamp(280px,24vw,330px);
 grid-template-columns:72px minmax(0,1fr)!important;
 width:var(--jsv-game-width,100vw)!important;
 border:0!important;border-radius:0!important;
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-stage{grid-column:2;grid-row:1}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-app-rail{grid-column:1;grid-row:1;padding:0!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-app-rail nav{grid-auto-rows:minmax(46px,1fr)}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-app-rail nav a{min-height:46px!important;font-size:10px!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-app-brand{margin-top:env(safe-area-inset-top,0px)}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-map-toolbar{top:16px;left:18px;right:190px;max-width:670px}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.is-adventure-open .jsf-ng-map-toolbar{right:calc(var(--jsv-game-panel-width) + 24px)}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-toolbar-row{grid-template-columns:minmax(160px,1fr) minmax(140px,190px)}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-category-filters{margin-right:0;max-width:100%}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-hunt-rail{
 position:absolute!important;inset:76px 12px 86px auto!important;width:var(--jsv-game-panel-width)!important;height:auto!important;max-height:calc(100% - 162px)!important;
 display:flex!important;flex-direction:column;gap:10px;padding:10px!important;border:1px solid #c4d3df;border-radius:18px;background:#f6f8fb!important;
 box-shadow:0 10px 34px #0a2a4940;overflow-y:auto!important;scrollbar-width:thin;transform:none!important;z-index:800;
}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-hunt-rail>*{flex:0 0 auto}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-hunt-rail.is-open{visibility:visible!important;opacity:1!important;pointer-events:auto!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-hunt-rail:not(.is-open){visibility:hidden!important;opacity:0!important;pointer-events:none!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-hero{padding:42px 17px 18px!important;background:#102d48!important;color:#fff!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-hero h2{font:700 30px/1.08 Georgia,serif!important;color:#fff!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-hero p{color:#deebf5!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-passport-card{padding:16px!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-hunt-head{display:flex!important;align-items:center;flex-wrap:wrap;gap:8px!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-hunt-close{display:grid!important;position:sticky!important;top:0!important;margin:0 0 -50px auto!important;width:40px!important;height:40px!important;min-height:40px!important;flex:0 0 40px;z-index:3}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-peek{top:76px!important;right:12px!important;bottom:auto!important;width:240px!important;min-height:66px!important;height:auto!important;background:#fff!important;color:#133852!important;padding:12px!important;border-color:#c6d4df!important;border-radius:15px}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-peek>span:not(.jsf-ng-peek-arrow){display:grid!important;font-size:13px!important;gap:4px}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-peek .jsf-ng-icon{width:28px;height:28px;color:#9b761e}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-layer-legend{top:16px!important;right:68px!important;width:102px!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsv-game-expand{display:grid;place-items:center;position:absolute;z-index:735;top:16px;right:12px;width:44px;height:44px;min-height:44px;border:1px solid #c7d7e3;border-radius:11px;background:#fff;color:#113653;box-shadow:0 3px 10px #16385222;font-size:24px;cursor:pointer}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsv-game-expand[hidden]{display:none!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-action-dock{left:50%!important;bottom:22px!important;width:min(410px,calc(100% - 160px))!important;height:66px!important;transform:translateX(-50%)!important;border-radius:18px!important;background:#fff!important;box-shadow:0 8px 22px #173a5933}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-action-dock>button.is-active{background:#102d48!important;color:#f1cb55!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-progress-btn{background:#efc745!important;color:#102d48!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-zoom{bottom:24px!important;right:12px!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.is-adventure-open .jsf-ng-zoom{right:calc(var(--jsv-game-panel-width) + 24px)!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .leaflet-control-attribution{background:#fffffff0;color:#233e52;font-size:10px;max-width:100%;white-space:normal}
@media(min-width:901px) and (max-width:1150px){
 html body.jsv-game-viewport-page.jsf-gameplay-atlas-page #jsf-niagara-game.jsf-ng-adventure.jsf-ng-game-v2.jsv-game-immersive{--jsv-game-panel-width:280px;grid-template-columns:64px minmax(0,1fr)!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-toolbar-row{grid-template-columns:minmax(0,1fr)}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-region-picker{width:min(220px,100%)}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-category-filters{overflow-x:auto}
}
@media(max-width:900px){
 html body.jsv-game-viewport-page.jsf-gameplay-atlas-page #jsf-niagara-game.jsf-ng-adventure.jsf-ng-game-v2.jsv-game-immersive{grid-template-columns:minmax(0,1fr)!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-stage{grid-column:1}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-app-rail{display:none!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-map-toolbar,
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.is-adventure-open .jsf-ng-map-toolbar{top:calc(8px + env(safe-area-inset-top,0px));left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));max-width:none}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-toolbar-row{grid-template-columns:minmax(0,1fr);gap:8px}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-map-search{margin-left:52px!important;width:calc(100% - 52px)!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-back-activity{top:calc(8px + env(safe-area-inset-top,0px))!important;width:44px!important;left:max(8px,env(safe-area-inset-left,0px))!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-back-activity>span{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden;clip-path:inset(50%)}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-region-picker,
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.has-city-controls .jsf-ng-region-picker{width:calc(100% - 112px);max-width:360px}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-layer-legend{top:calc(60px + env(safe-area-inset-top,0px))!important;right:calc(60px + env(safe-area-inset-right,0px))!important;width:44px!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-layer-legend>div{right:-52px;left:auto}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsv-game-expand{top:calc(60px + env(safe-area-inset-top,0px));right:max(8px,env(safe-area-inset-right,0px))}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-category-filters{gap:5px;overflow-x:auto;flex-wrap:nowrap}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-category-filters button{font-size:11px;padding:8px 10px;min-height:40px;flex-shrink:0}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-action-dock,
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-action-dock{left:0!important;right:0!important;bottom:0!important;transform:none!important;width:100%!important;height:calc(62px + env(safe-area-inset-bottom,0px))!important;padding:4px max(8px,env(safe-area-inset-right,0px)) max(4px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))!important;border-radius:16px 16px 0 0!important;background:#0d2943!important;z-index:790}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-action-dock>:is(button,a){background:transparent!important;color:#fff!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-action-dock>button.is-active{background:#163b58!important;color:#efc745!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-peek,
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-adventure-peek{top:auto!important;bottom:calc(70px + env(safe-area-inset-bottom,0px))!important;left:max(8px,env(safe-area-inset-left,0px))!important;right:max(8px,env(safe-area-inset-right,0px))!important;width:auto!important;min-height:62px!important;padding:12px 14px!important;border-radius:16px!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-peek:before{content:"";position:absolute;top:5px;left:calc(50% - 20px);width:40px;height:3px;border-radius:3px;background:#b9c7ce}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-zoom,
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.is-adventure-open .jsf-ng-zoom{bottom:calc(150px + env(safe-area-inset-bottom,0px))!important;right:max(8px,env(safe-area-inset-right,0px))!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-discovery-status{bottom:calc(150px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 78px);max-height:80px;overflow:auto}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-hunt-rail,
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-hunt-rail{inset:auto max(8px,env(safe-area-inset-right,0px)) calc(70px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))!important;width:auto!important;height:min(70%,660px)!important;max-height:calc(100% - 86px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;z-index:1050}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .leaflet-control-attribution{position:relative;bottom:calc(138px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 70px);font-size:9px}
 /* A short preview leaves the map touchable; opening details retains the existing full dialog. */
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-dialog.is-preview{pointer-events:none;padding:0}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-dialog.is-preview .jsf-ng-dialog-backdrop{display:none}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-dialog.is-preview .jsf-ng-dialog-card{position:absolute;left:8px;right:64px;bottom:calc(150px + env(safe-area-inset-bottom,0px));width:auto;max-height:calc(100% - 225px);margin:0;pointer-events:auto;overflow:auto}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .is-preview .jsf-ng-location-preview{display:grid;grid-template-columns:76px minmax(0,1fr);gap:8px;padding:8px}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .is-preview :is(.jsf-ng-preview-image,.jsf-ng-preview-fallback){height:90px;width:76px;border-radius:9px;align-self:start}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .is-preview .jsf-ng-preview-body{padding:0 20px 0 0}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .is-preview .jsf-ng-preview-body h2{font-size:16px;margin-bottom:5px}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .is-preview .jsf-ng-preview-body p{font-size:11px;margin:5px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .is-preview :is(.jsf-ng-preview-badge,.jsf-ng-preview-actions){display:none}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .is-preview .jsf-ng-preview-primary{font-size:11px;min-height:36px;padding:7px 4px;border:0;background:transparent;color:#805f11;justify-content:flex-start}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .is-preview .jsf-ng-dialog-close{position:absolute;top:4px;right:4px;width:30px;height:30px;margin:0;z-index:3}
}
@media(max-width:900px) and (max-height:480px){
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-adventure-peek{left:auto!important;right:8px!important;width:174px!important;min-height:54px!important;bottom:calc(68px + env(safe-area-inset-bottom,0px))!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-zoom{bottom:calc(68px + env(safe-area-inset-bottom,0px))!important;right:194px!important;grid-template-columns:repeat(3,40px)!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-layer-legend{top:8px!important;left:168px!important;right:auto!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsv-game-expand{top:8px;right:8px}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-map-toolbar{top:60px;max-height:calc(100% - 138px)}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-map-search{margin-left:0!important;width:100%!important}
 html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive.jsv-game-short .jsf-ng-dialog.is-preview .jsf-ng-dialog-card{left:8px;right:8px;bottom:130px;max-height:calc(100% - 190px)}
}
@media(prefers-reduced-motion:reduce){html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-hunt-rail{transition:none!important}}
/* Reopen controls must beat the retired desktop-only hidden-toggle rule. */
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-peek{display:flex!important}
html body.jsv-game-viewport-page #jsf-niagara-game.jsv-game-immersive .jsf-ng-adventure-peek[hidden]{display:none!important}

/* Plugin-owned game frame never reserves ordinary site advertising/member gutters. */
html body.jsv-game-viewport-page.jsv-game-viewport-active > :is(#jsf-xp-buddypanel,#jsf-member-drawer,[data-jsv-site-sponsor-rail],.jsv-mobile-header-spacer) {display:none!important}
html body.jsv-game-viewport-page #jsf-niagara-game[data-jsth-viewport-bound="1"] {column-gap:0!important;row-gap:0!important}
