/* V7.0 — mobile Estate overview + six-place Valley directory.
 * The archival scene, exact image bytes, original project data and click
 * controllers remain unchanged. Styling is phone-scoped and progressive.
 */
.jw-estate-backdrop,.jw-estate-markers,.jw-valley-places,
.jw-estate-details-dismiss{display:none;}
@media (max-width:650px), (max-width:900px) and (max-height:540px) and (orientation:landscape) {
  body.jw-mobile-estate #cinematicWorld.lw-scale--estate .jw-estate-backdrop {
    display:block!important;
    position:absolute;inset:0;width:100%;height:100%;
    object-fit:cover;filter:blur(16px) brightness(.49) saturate(.83);
    transform:scale(1.07);pointer-events:none;z-index:0;
  }
  /* The original 1672x941 image fits a panoramic frame instead of being
     cropped horizontally by object-fit:cover in a tall 390x590 rectangle.
     Markers, links and artwork use the same authored aspect ratio. */
  body.jw-mobile-estate #cinematicWorld.lw-scale--estate #cinematicScene{
    position:absolute!important;inset:auto!important;
    left:50%!important;top:46%!important;
    width:105%!important;height:auto!important;
    aspect-ratio:1672 / 941!important;
    transform:translate(
      calc(-50% + var(--cine-x,0px)),
      calc(-50% + var(--cine-y,0px))
    ) scale(var(--cine-scale,1))!important;
    box-shadow:0 0 0 1px #e9d49e9c,0 13px 34px #04150dcc;
  }
  body.jw-mobile-estate #cinematicWorld #cinematicImage {
    object-fit:contain!important;
  }
  /* Original runtime hides 15 tiny graph pins at phone width and clamps
     district labels against the viewport. Separate six place markers
     reuse the ORIGINAL click buttons and the unmodified place coordinates. */
  body.jw-mobile-estate #cinematicWorld .cinematic-nodes,
  body.jw-mobile-estate #cinematicWorld .cinematic-districts,
  body.jw-mobile-estate #cinematicWorld .cinematic-links{
    display:none!important;
  }
  body.jw-mobile-estate #cinematicWorld .jw-estate-markers{
    display:block;position:absolute;inset:0;z-index:8;
    pointer-events:none;
  }
  body.jw-mobile-estate #cinematicWorld .jw-estate-marker{
    position:absolute;display:flex;align-items:center;justify-content:center;
    transform:translate(-50%,-50%);
    width:31px;height:31px;min-height:31px;padding:0;
    border:1.5px solid #f5e4a7;
    border-radius:999px;
    color:#fdf3d1;background:#183b28e8;
    box-shadow:0 0 0 3px #06150d70,0 2px 9px #f1d99988;
    font:bold 12px/1 system-ui,sans-serif;
    cursor:pointer;pointer-events:auto;
    touch-action:manipulation;
  }
  body.jw-mobile-estate .jw-estate-marker[aria-current="true"]{
    background:#f3e6b9;color:#183724;
  }
  body.jw-mobile-estate .jw-estate-marker:focus-visible,
  body.jw-mobile-valley .jw-valley-places button:focus-visible{
    outline:3px solid #fff0b1;outline-offset:3px;
  }
  body.jw-mobile-estate #terrainWorld.cinematic-active .world-facts,
  body.jw-mobile-estate #terrainWorld.cinematic-active .network-compass{
    display:none!important;
  }
  body.jw-mobile-estate.jw-estate-details-open #terrainWorld.cinematic-active .world-facts{
    display:block!important;
    left:10px!important;right:10px!important;bottom:133px!important;
    width:calc(100% - 20px)!important;max-height:145px!important;
    overflow-y:auto!important;padding:11px 13px!important;
    z-index:110!important;
    box-shadow:0 12px 32px #06150de0!important;
  }
  body.jw-mobile-estate.jw-estate-details-open .jw-estate-details-dismiss{
    display:block!important;
    position:absolute;bottom:281px;right:11px;
    z-index:111;min-height:35px;
    padding:7px 9px;
    color:#f5eccd;background:#0d2a1cee;
    border:1px solid #f3dda9b0;font:bold 11px/1.1 system-ui,sans-serif;
    cursor:pointer;
  }
  /* A readable one-line swipeable list replaces six tiny stacked chips. */
  body.jw-mobile-estate #cineDistrictRail{
    display:flex!important;flex-wrap:nowrap!important;
    left:8px!important;right:8px!important;
    bottom:130px!important;gap:6px;
    justify-content:flex-start!important;
    overflow-x:auto;overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    padding:5px 3px;
    scrollbar-width:thin;
    z-index:26;
  }
  body.jw-mobile-estate #cineDistrictRail button{
    flex:0 0 auto;min-width:116px;min-height:42px;
    padding:9px 10px!important;
    font:700 10px/1.2 system-ui,sans-serif!important;
    white-space:nowrap;scroll-snap-align:start;
  }
  body.jw-mobile-estate .jw-mobile-context{display:none!important;}

  /* Valley: keep every original marker clickable; numbered map pins avoid
     hiding the actual structures beneath large text label cards. */
  /* The far-left Outdoors pin sits at x=18.4% in the original artwork;
     modestly shift the entire image stage to keep its tap target inside. */
  body.jw-mobile-valley #cinematicWorld.lw-scale--valley #lwValleyStage{
    left:calc(50% + 23px)!important;
  }
  body.jw-mobile-valley #cinematicWorld.lw-scale--valley .lw-spot{
    display:flex!important;align-items:center;justify-content:center;
    min-width:32px!important;max-width:32px!important;
    width:32px!important;height:32px!important;
    min-height:32px!important;
    border-radius:50%!important;
    padding:0!important;gap:0!important;
    transform:translate(-50%,-50%)!important;
    background:#173d2bed!important;
    border:1.5px solid #f2e2b0!important;
    box-shadow:0 0 0 3px #0b2019ab,0 3px 11px #0c2014c7!important;
    touch-action:manipulation;overflow:visible;
  }
  body.jw-mobile-valley .lw-spot span,
  body.jw-mobile-valley .lw-spot:before{display:none!important;}
  body.jw-mobile-valley .lw-spot:after {
    content:attr(data-jw-place);
    color:#fff0c3;
    font:bold 12px/1 system-ui,sans-serif;
    display:block;
    text-shadow:0 1px #00190d;
  }
  body.jw-mobile-valley #cinematicWorld.lw-scale--valley .lw-spot[aria-current="true"]{
    background:#e9e7b8!important;
    border-color:#fff8dd!important;
  }
  body.jw-mobile-valley #cinematicWorld.lw-scale--valley .lw-spot[aria-current="true"]:after{
    color:#172d20!important;
  }
  body.jw-mobile-valley .jw-mobile-context{display:none!important;}

  body.jw-mobile-valley .jw-valley-places{
    display:flex;grid-column:1/-1;order:-3;align-items:center;
    gap:6px;min-width:0;width:100%;
    background:#102d21ed;border:1px solid #c3b17e7c;
    padding:5px 6px;
  }
  .jw-valley-places[hidden]{display:none!important;}
  body.jw-mobile-valley .jw-valley-places-title{
    flex:0 0 auto;white-space:nowrap;
    color:#ecdfb3;
    font:700 10px/1.1 system-ui,sans-serif;
    letter-spacing:.03em;
  }
  body.jw-mobile-valley .jw-valley-places-list{
    display:flex;gap:6px;min-width:0;flex:1;
    overflow-x:auto;overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    scrollbar-width:thin;
  }
  body.jw-mobile-valley .jw-valley-places button{
    flex:0 0 auto;min-height:40px;
    padding:9px 11px;white-space:nowrap;
    scroll-snap-align:start;
    color:#f4e9c5;background:#254531;
    border:1px solid #b9b4869e;
    font:bold 10px/1.2 system-ui,sans-serif;
    touch-action:manipulation;cursor:pointer;
  }
  body.jw-mobile-valley .jw-valley-places button[aria-current="true"]{
    background:#e7e9ba;color:#183526;border-color:#faf1cf;
  }
  @media (prefers-reduced-motion:reduce){
    #cinematicWorld #cinematicScene,
    #cinematicWorld .jw-estate-marker{transition:none!important;}
  }
}
@media (max-width:900px) and (max-height:540px) and (orientation:landscape){
  body.jw-mobile-estate #cinematicWorld.lw-scale--estate #cinematicScene{
    width:100%!important;top:56%!important;
  }
  body.jw-mobile-estate #cineDistrictRail{bottom:134px!important;}
  body.jw-mobile-estate.jw-estate-details-open #terrainWorld.cinematic-active .world-facts{
    bottom:83px!important;max-height:105px!important;
  }
  body.jw-mobile-estate.jw-estate-details-open .jw-estate-details-dismiss{
    bottom:192px;
  }
}
