/* Fix My Fail 0.9.3 build32 — display-only lock for the ONE premium map.
 * Original illustration, cosmetics, game physics, levels and interactions remain unchanged.
 * Prevent WKWebView/restoration from exposing arbitrary scrolled pieces of the map.
 */
.world-hub {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
}
.hub-shell {
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  background-position: center top !important;
  background-size: 100% 100% !important;
}
.hub-topbar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 24 !important;
}
.hub-map {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.hub-node.n0 {top: 76.0% !important;}
.hub-node.n1 {top: 64.1% !important;}
.hub-node.n2 {top: 52.0% !important;}
.hub-node.n3 {top: 40.0% !important;}
.hub-node.n4 {top: 28.0% !important;}
.hub-node.n5 {top: 16.1% !important;}
.hub-special, .hub-pass {top: 15.0% !important;}
.hub-daily, .hub-wheel {top: 38.0% !important;}
.hub-vault-mini {top: 67% !important;}
.hub-bottom-nav {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  transform: none !important;
  margin: 0 !important;
  z-index: 30 !important;
}
.hub-node {transition: filter .15s ease !important;}
@media (max-height: 740px) {
  .hub-card {width: 20vw !important;}
  .hub-card .pic {height: 32px !important;}
  .hub-card small {font-size: 8px !important;}
  .hub-node {transform: scale(.87) !important;transform-origin:center !important;}
  .hub-bottom-nav button {min-height: 56px !important;}
}

/* Isolated 3D terrain candidate, enabled only with ?terrain3d=1. */
.hub-shell.terrain-ready{background-image:none!important;background-color:#249bb6!important}
.hub-shell.terrain-ready:before,.hub-shell.terrain-ready:after{display:none!important}

/* The shell holds fixed controls; the route beneath it uses native vertical scrolling. */
.hub-route-scroll{position:absolute;inset:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:none;z-index:1}
.hub-route-scroll::-webkit-scrollbar{display:none}
.hub-route-content{position:relative;width:100%;min-height:100%;background:#249bb6}
.hub-route-world{position:absolute;left:0;width:100%;overflow:hidden;background:#249bb6}
.hub-route-world .hub-node{position:absolute!important;z-index:3!important;touch-action:pan-y!important}
.hub-map>.hub-card,.hub-map>.hub-vault-mini{z-index:5!important}
.hub-zone-sign{pointer-events:none!important;z-index:6!important}
.hub-shell:has(.hub-route-world.terrain-ready){background-image:none!important;background-color:#249bb6!important}
.hub-shell:has(.hub-route-world.terrain-ready):before,.hub-shell:has(.hub-route-world.terrain-ready):after{display:none!important}

/* Build40: restrained depth and one-shot delivery celebrations. */
.result-content{position:relative;isolation:isolate}
.delivery-celebration{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:45;contain:layout paint}
.delivery-celebration i{position:absolute;display:block;pointer-events:none}
.delivery-confetti{width:3px;height:3px;border-radius:50%;box-shadow:0 0 3px #fff2cdaa}
.delivery-win-star{font:700 10px/1 system-ui;text-shadow:0 1px 2px #a3793b44}
.delivery-win-ring{width:44px;height:23px;border-radius:50%;border:1px solid #ffe6a088;box-shadow:0 0 5px #ffd36f44}
.hub-route-world .hub-node.current .stamp{box-shadow:inset 0 3px 1px #fff5b9,inset 0 -4px 0 #e99927,0 0 16px #ffe18055!important}
.hub-route-world .hub-node:not(.locked) .stars{filter:drop-shadow(0 2px 1px #734c22)}
.hub-node.delivery-arrived .stamp{animation:delivery-arrival-stamp .65s ease-out both}
@keyframes delivery-arrival-stamp{0%{filter:brightness(1);scale:1}35%{filter:brightness(1.3);scale:1.12}70%{filter:brightness(1.1);scale:.98}100%{filter:brightness(1);scale:1}}
@media(prefers-reduced-motion:reduce){.hub-node.delivery-arrived .stamp{animation:none}}

.journey-atmosphere{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:35}
.journey-atmosphere svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.journey-dust{position:absolute;left:-8px;top:-8px;width:16px;height:16px;border-radius:50%;background:radial-gradient(circle,#f6e6bf 0%,#e0d1aa99 45%,transparent 72%);opacity:0}
.journey-arrival-beam{position:absolute;width:75px;height:145px;background:linear-gradient(to top,#ffe6a0aa,transparent);clip-path:polygon(38% 100%,62% 100%,100% 0,0 0);transform-origin:50% 100%;opacity:0}

/* Route coordinates own scroll anchoring; virtual DOM updates must not move the viewport. */
.hub-route-scroll,.hub-route-content,.hub-route-world{overflow-anchor:none}
