/* screen-fit.css · sorahseong.com · 2026-11-28
   Three small fixes found in a check of the live site at 19 screen sizes.
   Load it last, after every other stylesheet. */

/* 1. Very small phones (340px wide or less, such as the first iPhone SE).
      In Classic, the plant beside the Practice door stuck out 6px past the right edge of the screen,
      so the whole home page could slide sideways a little. Move the plant 8px toward the door. */
@media (max-width: 340px) {
  body[data-site-scene="plain"] .forest-landing:has(.forest-stage[data-scene="plain"]) .botanical-practice {
    left: calc(50% + 12px);
  }
}

/* 2. Desktops, Forest and City View, at the top of the home page.
      The menu sits on a pale band there, and the yellow "Home" (the page you are on) could hardly be read.
      Show it in the site's black instead. It stays bold, so it still stands out.
      Other pages and the Treetops scene keep the yellow, because their menu sits on a dark background. */
@media (min-width: 901px) {
  body.home-view:is([data-site-scene="forest"], [data-site-scene="nyc"]) > .header .nav a[aria-current="page"] {
    color: #17151f !important;
  }
}

/* 3. Short wide screens (for example a big phone turned sideways, about 932 x 430, or a short browser window).
      In Forest, City View and Treetops, the "Hi, I'm Sorah" introduction is pulled up so that it peeks in at
      the bottom of the first screen. On a short screen this pulled it up over the doors (Forest) and the
      treasure chests (City View, Treetops). Never let the introduction start higher than 620px from the top.
      Screens 721px tall or more are not affected, and on 720px-tall screens nothing moves either.
      The first value inside max() is the site's own rule from home-scenic-prototype.css, kept as it is. */
@media (min-width: 901px) and (max-height: 720px) {
  body.home-view .forest-landing:has(.forest-stage:not([data-scene="plain"])) .landing-reflection {
    margin-top: max(calc(100svh - var(--scene-height) - var(--signature-height) - 24px - var(--home-intro-lift)),
                    calc(624px - var(--scene-height)));
  }
}
