/* treetop-mobile.css · sorahseong.com home, Treetops on phones and iPads (up to 900px wide) · v3, 29 Nov 2026
   Load it after city-mobile.css (the last stylesheet). Laptops and desktops are not changed. */

/* 1. Phones: the "Move me to a treasure chest" label gets the City View look.
      It was a dark pill; now it is a little dark inside, with a white dotted line around it and white letters.
      Same words, same place above the ghost's ears, still gone after the first move.
      (Upright iPads get the same look from city-mobile.css.) */
@media (max-width: 680px) {
  html body.home-view[data-site-scene="treetop"] .forest-stage[data-scene="treetop"] .spirit-wrap.touch-draggable-ghost.ghost-move-invitation::after {
    padding: 5px 12px 6px;
    background: rgba(14, 14, 34, .42);
    border: 1.5px dotted rgba(255, 255, 255, .92);
    border-radius: 999px;
    box-shadow: none;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  }
}

/* 2. Phones and iPads: the resting ghost moves to the right side of the night sky
      (it rested in the middle). On phones it sits a little below the top, where the sky has room. Only the resting place changes: dragging, a parked ghost and the moves
      around an open chest are the site's own.
      On phones the ghost stays at least 101px from the right edge, so its label always fits the screen.
      v2: on 681-900px screens only for touch screens (iPads), where the label sits above the ghost. A laptop window
      that narrow keeps the site's middle place, because there the label sits beside the ghost and would run off. */
@media (max-width: 680px) {
  html body.home-view[data-site-scene="treetop"] .forest-stage[data-scene="treetop"] .connections[data-selected=""]:not(.path-cursor-active) .spirit-wrap:not(.mobile-ghost-dragging, .mobile-ghost-parked) {
    left: min(72%, calc(100% - 101px));
    top: 55%;
  }
}
@media (min-width: 681px) and (max-width: 900px) and (hover: none) and (pointer: coarse) {
  html body.home-view[data-site-scene="treetop"] .forest-stage[data-scene="treetop"] .connections[data-selected=""]:not(.path-cursor-active) .spirit-wrap:not(.mobile-ghost-dragging, .mobile-ghost-parked) {
    left: 72%;
    top: 50%;
  }
}

/* 3. Phones and iPads: bigger chests. They were 1.15x and looked tiny; now 1.75x on phones and 2.8x on iPads.
      Same drawing and colours; the sprouts and the vines are unchanged. */
@media (max-width: 680px) {
  html body.home-view .forest-stage[data-scene="treetop"] .discovery .light-call .treasure {
    scale: 1.75;
  }
}
@media (min-width: 681px) and (max-width: 900px) {
  html body.home-view .forest-stage[data-scene="treetop"] .discovery .light-call .treasure {
    scale: 2.8;
  }
}
/*    The flower that opens behind a chosen chest grows by the same amount, so it still frames the chest
      (lotus, sunflower, rose; drawn by chest-pathways.js). */
@media (max-width: 680px) {
  html body.home-view .forest-stage[data-scene="treetop"] .chest-pathways .cp-blossom {
    transform-box: fill-box;
    transform-origin: center;
    scale: 1.5;
  }
}
@media (min-width: 681px) and (max-width: 900px) {
  html body.home-view .forest-stage[data-scene="treetop"] .chest-pathways .cp-blossom {
    transform-box: fill-box;
    transform-origin: center;
    scale: 2.4;
  }
}
/* Phones turned sideways fall in the iPad width range; their screen is short, so the ghost rests a little lower
   there, below the name strip, with its label in view. */
@media (min-width: 681px) and (max-width: 900px) and (orientation: landscape) and (hover: none) and (pointer: coarse) {
  html body.home-view[data-site-scene="treetop"] .forest-stage[data-scene="treetop"] .connections[data-selected=""]:not(.path-cursor-active) .spirit-wrap:not(.mobile-ghost-dragging, .mobile-ghost-parked) {
    top: 53%;
  }
}

/* 4. v3: the warm yellow light inside an open chest grows with the chest. chest-open.css draws it at its old size
      (46 x 34px), so after 3 the bigger chest and flower covered it and the chest no longer glowed. It now grows as much
      as the flower (1.5x on phones, 2.4x on iPads) and moves up to the middle of the chest, which grows upward from its
      bottom. Only `translate` and `transform` are set: the opening (chest-open.css) and the breathing on phones
      (chest-breathe.css) use `scale` and `opacity`, and keep working on top. */
@media (max-width: 680px) {
  html body.home-view .forest-stage[data-scene="treetop"] .discovery .light-call::before {
    translate: 0 -7px;
    transform: scale(1.5);
  }
}
@media (min-width: 681px) and (max-width: 900px) {
  html body.home-view .forest-stage[data-scene="treetop"] .discovery .light-call::before {
    translate: 0 -20px;
    transform: scale(2.4);
  }
}
