/* Desktop-only Home prototype: a persistent scene, independent of portal geometry. */
@media (min-width: 901px) {
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain])) {
    --home-landscape: url('assets/forest-background.jpg');
    --home-reading-rgb: 14, 39, 29;
    --home-intro-lift: 0px;
    background: transparent;
    isolation: isolate;
  }
  body.home-view .forest-landing:has(.forest-stage[data-scene=treetop]) {
    --home-landscape: url('assets/treetop-background.png');
    --home-reading-rgb: 13, 22, 38;
    --home-intro-lift: 28px;
  }
  body.home-view .forest-landing:has(.forest-stage[data-scene=nyc]) {
    --home-landscape: url('assets/nyc-photo-matthew-wiebe-3840.jpg');
    --home-reading-rgb: 36, 31, 31;
    --home-intro-lift: 64px;
  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain]))::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: max(840px, 116svh);
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(rgba(5, 14, 18, .22), rgba(5, 14, 18, .22)), var(--home-landscape) center / cover no-repeat;
  }
  body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::before {
    transform: translateY(-138px) scale(1.18);
  }
  /* Keep animated canopy details registered to the now-fixed artwork. */
  body.home-view .forest-stage:not([data-scene=plain]) > :is(.forest-leaf-layer,.foliage-detail,.ambient) {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    height: max(840px, 116svh);
  }
  body.home-view .forest-stage:not([data-scene=plain]) {
    background: transparent;
  }
  body.home-view .forest-stage:not([data-scene=plain]) > :is(.forest-scene,.treetop-scene,.nyc-scene,.landing-bottom-shade,.forest-shade) {
    visibility: hidden;
  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain])) .landing-reflection {
    margin-top: calc(100svh - var(--scene-height) - var(--signature-height) - 24px - var(--home-intro-lift));
    background: transparent;
    isolation: isolate;
  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain]))::after {
    content: "";
    position: absolute;
    inset: calc(100svh - var(--signature-height) - 124px - var(--home-intro-lift)) 0 0;
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 100px);
    mask-image: linear-gradient(to bottom, transparent, #000 100px);
    background: linear-gradient(90deg,
      rgba(var(--home-reading-rgb), .91) 0%,
      rgba(var(--home-reading-rgb), .88) 49%,
      rgba(var(--home-reading-rgb), .68) 70%,
      rgba(var(--home-reading-rgb), .22) 100%);

  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain])) > :is(.landing-contact,.home-section-pagination) {
    position: relative;
    z-index: 2;
    background: transparent;
  }
}

/* Quiet grounding, Classic desktop only; no layout or interaction changes. */
@media (min-width: 901px) {
  body.home-view[data-site-scene=plain] .chic-doors .door-portal::before {
    content: '';
    position: absolute;
    left: -12%; right: -12%; bottom: -8px;
    height: 13px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(55, 49, 44, .16), rgba(55, 49, 44, 0) 72%);
    z-index: -1;
    pointer-events: none;
  }

}

/* Desktop scenic refinement: wider journeys, unchanged vertical geometry. */
@media (min-width: 901px) {
  body.home-view .forest-stage:is([data-scene=treetop],[data-scene=nyc]) > .connections {
    left: calc(-1 * clamp(30px, 8vw, 128px));
    right: calc(-1 * clamp(30px, 8vw, 128px));
  }
  body.home-view .forest-landing:has(.forest-stage[data-scene=treetop]) {
    --home-intro-lift: 24px;
  }
  body.home-view .forest-landing:has(.forest-stage:not([data-scene=plain])) > .landing-contact::before {
    content: '';
    position: absolute;
    inset: -70px 0 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(var(--home-reading-rgb), 0), rgba(var(--home-reading-rgb), .30) 110px, rgba(var(--home-reading-rgb), .38));
  }
}

/* City footer: a touch of neutral black depth without a hard boundary. */
@media (min-width: 901px) {
  body.home-view .forest-landing:has(.forest-stage[data-scene=nyc]) > .landing-contact::before {
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,.34) 110px, rgba(0,0,0,.44));
  }
}

/* Reference E/D pathway decoration, desktop only. Existing destinations untouched. */
@media(min-width:901px){
 .journey-trail.has-pathway-concept>.trail-leg{display:none}
 .pathway-concept{pointer-events:none}
 .pathway-concept .skyline-halo{fill:none;stroke:#ffdb83;stroke-width:5;opacity:.48;filter:blur(4px)}
 .pathway-concept .skyline-core{fill:none;stroke:#fff1c4;stroke-width:2.1;filter:drop-shadow(0 0 4px #ffe09b)}
 .pathway-concept .skyline-window{filter:drop-shadow(0 0 3px #faca57)}
 .pathway-concept .skyline-beacon{filter:drop-shadow(0 0 4px #ff7b7b)}
 .pathway-concept .footprint{filter:drop-shadow(0 0 3px #fff0b3)}
}

/* Restore the previous cyan/lime/pink route palette on destination attention. */
@media(min-width:901px){
 .pathway-concept [data-destination=research]{--route-neon:#8de5ff}
 .pathway-concept [data-destination=practice]{--route-neon:#c7ff78}
 .pathway-concept [data-destination=books]{--route-neon:#ff9cdd}
 .pathway-concept .skyline-focus{opacity:0;transition:opacity .35s ease-out}
 .pathway-concept .skyline-focus-line{fill:none;stroke:var(--route-neon);stroke-width:3;filter:drop-shadow(0 0 5px var(--route-neon))}
 .pathway-concept .footprint ellipse{transition:fill .35s ease-out}
.connections[data-selected=research] .skyline-focus[data-destination=research],
.connections:has(.discovery-research:focus-within) .skyline-focus[data-destination=research],
.connections:has(.discovery-research:hover) .skyline-focus[data-destination=research]{opacity:.95}
.connections[data-selected=research] .footprint-branch[data-destination=research] ellipse,
.connections:has(.discovery-research:focus-within) .footprint-branch[data-destination=research] ellipse,
.connections:has(.discovery-research:hover) .footprint-branch[data-destination=research] ellipse{fill:var(--route-neon)}
.connections[data-selected=research] .footprint-branch[data-destination=research] .footprint,
.connections:has(.discovery-research:focus-within) .footprint-branch[data-destination=research] .footprint,
.connections:has(.discovery-research:hover) .footprint-branch[data-destination=research] .footprint{opacity:1;filter:drop-shadow(0 0 5px var(--route-neon))}
.connections[data-selected=practice] .skyline-focus[data-destination=practice],
.connections:has(.discovery-practice:focus-within) .skyline-focus[data-destination=practice],
.connections:has(.discovery-practice:hover) .skyline-focus[data-destination=practice]{opacity:.95}
.connections[data-selected=practice] .footprint-branch[data-destination=practice] ellipse,
.connections:has(.discovery-practice:focus-within) .footprint-branch[data-destination=practice] ellipse,
.connections:has(.discovery-practice:hover) .footprint-branch[data-destination=practice] ellipse{fill:var(--route-neon)}
.connections[data-selected=practice] .footprint-branch[data-destination=practice] .footprint,
.connections:has(.discovery-practice:focus-within) .footprint-branch[data-destination=practice] .footprint,
.connections:has(.discovery-practice:hover) .footprint-branch[data-destination=practice] .footprint{opacity:1;filter:drop-shadow(0 0 5px var(--route-neon))}
.connections[data-selected=books] .skyline-focus[data-destination=books],
.connections:has(.discovery-books:focus-within) .skyline-focus[data-destination=books],
.connections:has(.discovery-books:hover) .skyline-focus[data-destination=books]{opacity:.95}
.connections[data-selected=books] .footprint-branch[data-destination=books] ellipse,
.connections:has(.discovery-books:focus-within) .footprint-branch[data-destination=books] ellipse,
.connections:has(.discovery-books:hover) .footprint-branch[data-destination=books] ellipse{fill:var(--route-neon)}
.connections[data-selected=books] .footprint-branch[data-destination=books] .footprint,
.connections:has(.discovery-books:focus-within) .footprint-branch[data-destination=books] .footprint,
.connections:has(.discovery-books:hover) .footprint-branch[data-destination=books] .footprint{opacity:1;filter:drop-shadow(0 0 5px var(--route-neon))}
}
@media(prefers-reduced-motion:reduce){.pathway-concept .skyline-focus,.pathway-concept .footprint ellipse{transition:none}}
/* City reading scrim: broad eased feather, rather than a short dark ledge. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::after{
  top:calc(100svh - var(--signature-height) - 304px - var(--home-intro-lift));
  -webkit-mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px);
  mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px);
 }
}
/* Slightly clearer treasure symbols, with rooftop/contact anchors unchanged. */
.forest-stage:is([data-scene=treetop],[data-scene=nyc]) .light-call .treasure{
 scale:1.15;
 transform-origin:50% 100%;
}
/* A slightly broader City journey, shifted left as one interactive group. */
@media(min-width:901px){
 body.home-view .forest-stage[data-scene=nyc]>.connections{
  left:calc(-1 * clamp(34px,9vw,144px));
  right:calc(-1 * clamp(34px,9vw,144px));
  translate:calc(clamp(24px,4vw,56px) - 36px) -230px;
 }
}
/* City lights remain visible beside the reading column and contact signature. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::after{
  background:linear-gradient(90deg,rgba(36,31,31,.91) 0%,rgba(36,31,31,.86) 49%,rgba(36,31,31,.30) 72%,rgba(36,31,31,.03) 100%);
 }
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])>.landing-contact::before{
  background:linear-gradient(90deg,rgba(0,0,0,.28) 0%,rgba(0,0,0,.24) 45%,rgba(0,0,0,.08) 72%,transparent 100%);
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 110px);
  mask-image:linear-gradient(to bottom,transparent,#000 110px);
 }
}
/* Clear skyline at the contact area, with a soft exit from the reading scrim. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::before{
  background:linear-gradient(rgba(5,14,18,.12),rgba(5,14,18,.12)),var(--home-landscape) center/cover no-repeat;
 }
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::after{
  -webkit-mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px,#000 calc(100% - var(--home-contact-height,240px) - 90px),transparent calc(100% - var(--home-contact-height,240px)));
  mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px,#000 calc(100% - var(--home-contact-height,240px) - 90px),transparent calc(100% - var(--home-contact-height,240px)));
 }
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])>.landing-contact::before{
  background:linear-gradient(to bottom,transparent,rgba(0,0,0,.08) 110px);
 }
}
/* Eased edges avoid visible scrim boundaries in the open City sky. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::after{
  background:linear-gradient(90deg,rgba(36,31,31,.91) 0%,rgba(36,31,31,.90) 35%,rgba(36,31,31,.87) 42%,rgba(36,31,31,.79) 49%,rgba(36,31,31,.64) 56%,rgba(36,31,31,.44) 63%,rgba(36,31,31,.25) 70%,rgba(36,31,31,.11) 77%,rgba(36,31,31,.03) 85%,rgba(36,31,31,0) 96%);
  -webkit-mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px,#000 calc(100% - var(--home-contact-height,240px) - 180px),rgba(0,0,0,.94) calc(100% - var(--home-contact-height,240px) - 150px),rgba(0,0,0,.74) calc(100% - var(--home-contact-height,240px) - 120px),rgba(0,0,0,.44) calc(100% - var(--home-contact-height,240px) - 90px),rgba(0,0,0,.18) calc(100% - var(--home-contact-height,240px) - 60px),rgba(0,0,0,.03) calc(100% - var(--home-contact-height,240px) - 30px),transparent calc(100% - var(--home-contact-height,240px)));
  mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px,#000 calc(100% - var(--home-contact-height,240px) - 180px),rgba(0,0,0,.94) calc(100% - var(--home-contact-height,240px) - 150px),rgba(0,0,0,.74) calc(100% - var(--home-contact-height,240px) - 120px),rgba(0,0,0,.44) calc(100% - var(--home-contact-height,240px) - 90px),rgba(0,0,0,.18) calc(100% - var(--home-contact-height,240px) - 60px),rgba(0,0,0,.03) calc(100% - var(--home-contact-height,240px) - 30px),transparent calc(100% - var(--home-contact-height,240px)));
 }
}
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])>.landing-contact{border-top:1px solid rgba(235,239,232,.16)}
}
/* A unified reading atmosphere removes the left/right scrim edge entirely. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::after{
  background:rgba(14,18,25,.72);
  -webkit-mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px,#000 calc(100% - var(--home-contact-height,240px) - var(--home-fade-start,240px)),rgba(0,0,0,.95) calc(100% - var(--home-contact-height,240px) - var(--home-fade-para-top,216px)),rgba(0,0,0,.85) calc(100% - var(--home-contact-height,240px) - var(--home-fade-para-mid,150px)),rgba(0,0,0,.70) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px)),rgba(0,0,0,.50) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .72),rgba(0,0,0,.25) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .36),rgba(0,0,0,.04) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .12),transparent calc(100% - var(--home-contact-height,240px)));
  mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.04) 55px,rgba(0,0,0,.18) 110px,rgba(0,0,0,.45) 170px,rgba(0,0,0,.76) 225px,#000 280px,#000 calc(100% - var(--home-contact-height,240px) - var(--home-fade-start,240px)),rgba(0,0,0,.95) calc(100% - var(--home-contact-height,240px) - var(--home-fade-para-top,216px)),rgba(0,0,0,.85) calc(100% - var(--home-contact-height,240px) - var(--home-fade-para-mid,150px)),rgba(0,0,0,.70) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px)),rgba(0,0,0,.50) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .72),rgba(0,0,0,.25) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .36),rgba(0,0,0,.04) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .12),transparent calc(100% - var(--home-contact-height,240px)));
 }
}
/* Treetops: cool window lights, warm treasure destinations. */
@media(min-width:901px){
 .forest-stage[data-scene=treetop] .pathway-concept .skyline-window{fill:#bcecff;filter:drop-shadow(0 0 3px #9cddff)}
 .forest-stage[data-scene=treetop] .light-call .treasure{scale:1.26}
}

/* Cooler City atmosphere with a wider, gentler reading feather. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::before{
  background:linear-gradient(rgba(8,20,40,.24),rgba(8,20,40,.24)),var(--home-landscape) center/cover no-repeat;
 }
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::after{
  top:calc(100svh - var(--signature-height) - 464px - var(--home-intro-lift));
  background:rgba(10,19,34,.70);
  -webkit-mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.03) 70px,rgba(0,0,0,.12) 145px,rgba(0,0,0,.30) 225px,rgba(0,0,0,.53) 300px,rgba(0,0,0,.76) 370px,rgba(0,0,0,.94) 425px,#000 470px,#000 calc(100% - var(--home-contact-height,240px) - var(--home-fade-start,240px) - 80px),rgba(0,0,0,.88) calc(100% - var(--home-contact-height,240px) - var(--home-fade-para-top,216px)),rgba(0,0,0,.72) calc(100% - var(--home-contact-height,240px) - var(--home-fade-para-mid,150px)),rgba(0,0,0,.50) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px)),rgba(0,0,0,.30) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .72),rgba(0,0,0,.10) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .36),rgba(0,0,0,.01) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .12),transparent calc(100% - var(--home-contact-height,240px)));
  mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.03) 70px,rgba(0,0,0,.12) 145px,rgba(0,0,0,.30) 225px,rgba(0,0,0,.53) 300px,rgba(0,0,0,.76) 370px,rgba(0,0,0,.94) 425px,#000 470px,#000 calc(100% - var(--home-contact-height,240px) - var(--home-fade-start,240px) - 80px),rgba(0,0,0,.88) calc(100% - var(--home-contact-height,240px) - var(--home-fade-para-top,216px)),rgba(0,0,0,.72) calc(100% - var(--home-contact-height,240px) - var(--home-fade-para-mid,150px)),rgba(0,0,0,.50) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px)),rgba(0,0,0,.30) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .72),rgba(0,0,0,.10) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .36),rgba(0,0,0,.01) calc(100% - var(--home-contact-height,240px) - var(--home-fade-gap,84px) * .12),transparent calc(100% - var(--home-contact-height,240px)));
 }
}
/* Keep destination fireflies quiet until their route is selected. */
.forest-stage:is([data-scene=treetop],[data-scene=nyc]) .fireflies{opacity:0;transition:opacity .25s ease;pointer-events:none}
.forest-stage:is([data-scene=treetop],[data-scene=nyc]) .connections[data-selected=research] .discovery-research .fireflies,
.forest-stage:is([data-scene=treetop],[data-scene=nyc]) .connections[data-selected=practice] .discovery-practice .fireflies,
.forest-stage:is([data-scene=treetop],[data-scene=nyc]) .connections[data-selected=books] .discovery-books .fireflies{opacity:1}
@media(prefers-reduced-motion:reduce){.forest-stage:is([data-scene=treetop],[data-scene=nyc]) .fireflies{transition:none}}
/* Mobile pathway guidance: one quiet line, only before exploration. */
@media(max-width:680px){
 .forest-stage[data-scene=nyc] .connections{translate:10px -110px}
 body:is([data-site-scene=nyc],[data-site-scene=treetop]) .touch-draggable-ghost.ghost-move-invitation::after{content:'Move me to a treasure chest';width:max-content;max-width:none;white-space:nowrap;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;color:#fff;text-shadow:0 1px 3px #0009;font:italic 400 11px/1.4 Georgia,serif;left:50%;top:calc(100% + 3px);transform:translateX(-50%);text-align:center}
 body[data-site-scene=nyc] .touch-draggable-ghost:not(.ghost-move-invitation)::after{content:none}
}
/* The first-tap cue uses the same single-line translucent label as drag selection. */
@media(max-width:680px){
 .forest-stage:is([data-scene=nyc],[data-scene=treetop]) .mobile-light-armed .revealed-label{width:max-content;max-width:none;white-space:nowrap;left:50%;transform:translateX(-50%);background:transparent}
 .forest-stage:is([data-scene=nyc],[data-scene=treetop]) .mobile-light-armed .revealed-label::after{content:' · Tap to enter';display:inline;margin:0;font:500 .72em/1.3 Arial,sans-serif;white-space:nowrap;background:transparent}
 .forest-stage:is([data-scene=nyc],[data-scene=treetop]) .mobile-light-armed .revealed-label::before{background:rgba(0,0,0,.72)}
}
.forest-stage:is([data-scene=nyc],[data-scene=treetop]).pathway-hint-dismissed .connections .spirit-wrap::after{content:none!important}
/* Place the initial invitation beside, not below, the pathway explorer. */
@media(min-width:681px) and (hover:hover) and (pointer:fine){
 .forest-stage:is([data-scene=nyc],[data-scene=treetop]) .connections .spirit-wrap::after{position:absolute;left:calc(100% - 8px);top:0;font-size:13px}
 .forest-stage[data-scene=nyc] .connections[data-selected=""]:not(.path-cursor-active) .spirit-wrap{left:calc(49% - 20px)}
}
@media(max-width:680px){
 body:is([data-site-scene=nyc],[data-site-scene=treetop]) .touch-draggable-ghost.ghost-move-invitation::after{position:absolute;left:70%;top:-6px;transform:none;font-size:12px}
 .forest-stage[data-scene=nyc] .connections[data-selected=""] .spirit-wrap:not(.mobile-ghost-dragging):not(.mobile-ghost-parked){left:calc(49% - 16px)}
 .forest-stage[data-scene=nyc] .discovery-research{translate:8px 0}
 .forest-stage[data-scene=nyc] .discovery-practice{translate:-8px 0}
 .forest-stage:is([data-scene=nyc],[data-scene=treetop]) .discovery-books .revealed-label{translate:0 -8px!important}
}

/* A tiny upward adjustment to Forest's introduction only. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=forest]){--home-intro-lift:8px}
}
@media(max-width:680px){
 .forest-landing:has(.forest-stage[data-scene=forest]) .landing-reflection{margin-top:-56px}
}
/* Restore a discreet phone instruction bubble, separated from the ghost. */
@media(max-width:680px){
 body:is([data-site-scene=nyc],[data-site-scene=treetop]) .touch-draggable-ghost.ghost-move-invitation::after{
  left:60%;top:-34px;padding:6px 10px;background:rgba(0,0,0,.72);border:1px solid rgba(255,255,255,.20);border-radius:14px;box-shadow:none;
 }
}
/* Lower Classic's closing toast within its existing space, without moving what follows. */
body[data-site-scene=plain] .chic-speech-toast{position:relative;top:0!important}
@media(max-width:600px){body[data-site-scene=plain] .chic-speech-toast{top:2px!important}}
@media(max-width:360px){
 body:is([data-site-scene=nyc],[data-site-scene=treetop]) .touch-draggable-ghost.ghost-move-invitation::after{left:30%}
}

/* Classic alone: remove the cookie and tighten the doors-to-speech transition. */
body[data-site-scene=plain] .door-elephant .elephant-cookie{display:none!important}
body[data-site-scene=plain] .forest-landing .chic-speech{margin-top:6px!important}
@media(max-width:600px){body[data-site-scene=plain] .forest-landing .chic-speech{margin-top:4px!important}}
/* Desktop Classic: give the shorter introduction more space before the door scene. */
@media(min-width:901px){body.home-view[data-site-scene=plain] .forest-landing .chic-woodland > .chic-doors{margin-top:36px}}
/* Desktop Classic: close the gap above the speech divider without moving the door scene. */
@media(min-width:901px){body.home-view[data-site-scene=plain] .forest-landing .chic-speech{margin-top:-4px!important}}
/* Keep a little more white space between the handwritten toast and ocean footer. */
body.home-view[data-site-scene=plain] .forest-landing .chic-woodland .landing-contact{margin-top:70px}
@media(max-width:680px){body.home-view[data-site-scene=plain] .forest-landing .chic-woodland .landing-contact{margin-top:60px}}
/* Give the Forest phone cookie its own visible space below the doors. */
@media(max-width:680px){
 body[data-site-scene=forest] .door-elephant .elephant-cookie{display:block;position:absolute;width:30px;height:20px;left:24px;bottom:-45px;overflow:visible;transform:rotate(-8deg);filter:none}
}

/* Forest phones: a slightly fuller sleeping companion and a clear cookie below the doors. */
@media(max-width:680px){
 body[data-site-scene=forest] .chic-doors .door-elephant{left:calc(50% - 105.5px);width:200px;height:133.33px}
 body[data-site-scene=forest] .door-elephant .elephant-cookie{width:34px;height:22.67px;bottom:-38px}
 body.home-view .forest-landing:has(.forest-stage[data-scene=forest]) .landing-reflection{margin-top:-68px!important}
}
/* Phone contact invitations retain a quiet glimpse of their own landscape. */
@media(max-width:680px){
 body[data-site-scene=forest] .forest-landing{--mobile-contact-scene:url('assets/forest-background.jpg')}
 body[data-site-scene=treetop] .forest-landing{--mobile-contact-scene:url('assets/treetop-background.png')}
 body[data-site-scene=nyc] .forest-landing{--mobile-contact-scene:url('assets/nyc-photo-matthew-wiebe-3840.jpg')}
 body:is([data-site-scene=forest],[data-site-scene=treetop],[data-site-scene=nyc]) .forest-landing>.landing-contact{
  background:linear-gradient(to bottom,rgba(var(--reflection-floor),1),rgba(var(--reflection-floor),.70) 90px,rgba(var(--reflection-floor),.62)),var(--mobile-contact-scene) center/cover no-repeat;
 }
}
/* Leave a little more air above the Treetops phone ghost's face. */
@media(max-width:680px){
 body.home-view[data-site-scene=treetop] .touch-draggable-ghost.ghost-move-invitation::after{left:50%;top:-52px;transform:translateX(-50%);text-align:center}
}
/* City phones share the desktop's cool navy-charcoal atmosphere, not its layout. */
@media(max-width:680px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc]){--reflection-floor:9,13,20}
 body.home-view .forest-stage[data-scene=nyc] .forest-shade{background:linear-gradient(to bottom,rgba(8,13,23,.24),rgba(8,13,23,.12) 45%,rgba(9,13,20,.20) 72%,rgba(9,13,20,.30))}
}
/* Classic graduation label uses the same light blue on desktop and mobile. */
body[data-site-scene=plain] .forest-landing .speech-label-highlight{background:#ccecff!important}
/* Use one navy-black floor throughout the mobile City scene and its long fade. */
@media(max-width:680px){
 body.home-view .forest-stage[data-scene=nyc]{--landing-fade:9,13,20;background:#090d14}
 body.home-view .forest-stage[data-scene=nyc] .landing-bottom-shade{
  inset:38% 0 0;background:linear-gradient(to bottom,rgba(9,13,20,0),rgba(9,13,20,.06) 15%,rgba(9,13,20,.22) 36%,rgba(9,13,20,.52) 60%,rgba(9,13,20,.82) 80%,#090d14);
 }
}
/* Desktop City sunset fades away before the unchanged reading area. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc])::before{
  background:linear-gradient(to bottom,rgba(68,45,112,calc(.76 * var(--city-dusk,1))),rgba(181,77,127,calc(.67 * var(--city-dusk,1))) 24%,rgba(232,140,124,calc(.48 * var(--city-dusk,1))) 44%,rgba(42,47,73,calc(.20 * var(--city-dusk,1))) 62%,rgba(5,10,18,calc(.06 * var(--city-dusk,1))) 78%,rgba(0,0,0,calc(.08 * var(--city-dusk,1)))),linear-gradient(rgba(8,20,40,.24),rgba(8,20,40,.24)),var(--home-landscape) center/cover no-repeat;
  background-blend-mode:color,normal,normal;
  filter:contrast(calc(1 + .12 * var(--city-dusk,1))) brightness(calc(1 + .16 * var(--city-dusk,1)));
 }
}
/* A small downward breath for the desktop City introduction. */
@media(min-width:901px){
 body.home-view .forest-landing:has(.forest-stage[data-scene=nyc]){--home-intro-lift:56px}
}

/* v623: broaden only the desktop City footprint journey. Paths follow these anchors. */
@media(min-width:901px){
 body.home-view .forest-stage[data-scene=nyc] .discovery-research{left:27%;top:56.5%}
 body.home-view .forest-stage[data-scene=nyc] .discovery-practice{left:74%;top:67.5%}
 body.home-view .forest-stage[data-scene=nyc] .discovery-books{top:85%}
}
/* Keep the SQRT links gently separated from its business pillars on desktop. */
@media(min-width:681px){
 #practice-building .pb-business-pillars + .pb-card-actions{padding-top:10px}
}

/* Desktop: lift the closing toast slightly, preserving the mobile layout. */
@media (min-width: 681px) {
  body[data-site-scene] .chic-speech-toast {
    position: relative;
    top: -12px !important;
  }
}

/* Classic mobile home: lift the cursive closing line by a subtle 12px. */
@media (max-width: 680px) {
  body.home-view[data-site-scene=plain] .chic-speech-toast {
    top: -10px !important;
    padding-bottom: 8px; /* Keep the line in place; tighten the space below by 12px. */
  }
}

/* Paint the page canvas as well as the landing layers, so elastic overscroll
   never exposes the default white canvas. No change to scroll behavior. */
html:has(> body.home-view[data-site-scene="forest"]) {
  --home-canvas-art: url("assets/forest-background.jpg");
  --home-canvas-floor: #0e271d;
}
html:has(> body.home-view[data-site-scene="treetop"]) {
  --home-canvas-art: url("assets/treetop-background.png");
  --home-canvas-floor: #0d1626;
}
html:has(> body.home-view[data-site-scene="nyc"]) {
  --home-canvas-art: url("assets/nyc-photo-matthew-wiebe-3840.jpg");
  --home-canvas-floor: #090d14;
}
html:has(> body.home-view:is([data-site-scene="forest"], [data-site-scene="treetop"], [data-site-scene="nyc"])) {
  background-color: var(--home-canvas-floor);
  background-image: linear-gradient(transparent, rgba(6, 12, 19, .47)), var(--home-canvas-art);
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body.home-view:is([data-site-scene="forest"], [data-site-scene="treetop"], [data-site-scene="nyc"]) {
  background-color: transparent;
}


/* City View phones: move only the resting ghost up and slightly right. */
@media(max-width:680px){
 body.home-view[data-site-scene=nyc] .forest-stage[data-scene=nyc] .connections[data-selected=""]:not(.path-cursor-active) .spirit-wrap:not(.mobile-ghost-dragging,.mobile-ghost-parked){
  left:calc(49% + 10px);
  top:calc(65% - 41px);
 }
 body.home-view[data-site-scene=nyc] .forest-stage[data-scene=nyc] .spirit-wrap.touch-draggable-ghost.ghost-move-invitation::after{
  left:50%;top:-7px;transform:translate(-50%,-100%);
  max-width:calc(100vw - 40px);
 }
}
