/* tablet-menu.css · sorahseong.com · tablets and small laptops, 681–900px wide
   The Menu opens as the same dark panel on every page, with light words in every scene.
   Before this file:
     · Home: in Classic, Forest and City View the menu words were dark on the dark panel (almost invisible),
       because the desktop header's dark-word rules reached into the panel.
     · Home: the lower part of the open panel, and the Scene choices under it, slid behind the portrait
       (Classic) or the chest scene (Treetops), so they could not be pressed.
     · Reading pages (About, Research, Books, Practice): the menu opened as a row behind the blue band,
       half hidden and not clickable.
   Desktop (901px and up) and phones (680px and down) are unchanged. */
@media (min-width: 681px) and (max-width: 900px) {
  /* while the Menu is open, the header and its panel sit above the page
     (still below the tooltips, the back-to-top button and the page-turn curtain) */
  body > .header:has(.nav.open) { z-index: 60; }
  body:not(.home-view) > .header:has(.nav.open) { position: relative; }

  /* the open Menu on reading pages: the same panel as on Home (it scrolls inside on short screens) */
  body:not(.home-view) > .header .nav.open {
    position: absolute; top: 96px; right: 40px; left: auto; margin: 0;
    width: 270px; max-width: calc(100vw - 36px); max-height: calc(100svh - 120px); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 18px 22px;
    border-radius: 12px; background: rgba(13, 31, 32, .97); box-shadow: 0 12px 36px rgba(0, 0, 0, .18);
  }
  body:not(.home-view) > .header .nav.open > a { display: flex; align-items: center; padding: 10px 4px; }
  /* the current page's dot sits at the row's right end, as on Home */
  body:not(.home-view) > .header .nav.open > a[aria-current="page"]::after { left: auto; right: 4px; bottom: 20px; }

  /* Scene is the last row of the menu, under a thin line, and its choices open inside the panel
     (before, they opened below it and were cut off on Home) */
  body > .header .nav.open .header-scene { align-self: stretch !important; width: auto !important; margin: 6px 0 0 !important; }
  body[data-site-scene] > .header .nav.open .header-scene > summary {
    justify-content: flex-start !important;
    padding: 14px 4px 6px !important;
    border-left: 0 !important; border-top: 1px solid rgba(255, 255, 255, .18) !important;
  }
  /* on short screens the site splits the menu into two columns; with Scene open it becomes one column
     that scrolls, so the choices get the full width */
  body > .header .nav.open:has(.header-scene[open]) { flex-wrap: nowrap !important; }
  body > .header .nav.open .header-scene .scene-dock-panel {
    position: relative !important; top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
    width: auto !important; max-width: none !important; max-height: none !important; overflow: visible !important;
    margin: 8px 0 4px !important;
  }

  /* light words on the dark panel in every scene (the current page keeps its own light colour) */
  body > .header .nav.open > a:not([aria-current]) { color: #fff !important; }
  body > .header .nav.open .header-scene { --scene-ink: #fff; }
  body[data-site-scene="plain"] > .header .nav.open .header-scene { --scene-icon-ink: #d6a477; }
  body[data-site-scene="forest"] > .header .nav.open .header-scene { --scene-icon-ink: #a2edb9; }
  body[data-site-scene="nyc"] > .header .nav.open .header-scene { --scene-icon-ink: #b1d7ff; }
  body[data-site-scene="treetop"] > .header .nav.open .header-scene { --scene-icon-ink: #ffd36d; }
}
