/* scene-compact.css · sorahseong.com, phones (680px and down)
   The Scene control in the bottom bar becomes a quiet menu item, the same as the desktop header:
       [picture of the current scene] Scene ⌃
   One size everywhere (home and the reading pages), centred on the bar and level with Previous / Next.
   The chevron points up because the panel opens upward; it turns down while the panel is open.
   The panel itself and everything it does are unchanged.
   Replaces scene-quick.css, scene-quick.js and scene-quick-alignment.css. */
@media (max-width: 680px) {
  body[data-site-scene="plain"] :is(details.scene-dock, details.reading-scene-picker) { --scene-mark: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4.5 14.5V6.5a3.5 3.5 0 0 1 7 0v8M2.5 14.5h11%22/%3E%3Ccircle cx=%229.6%22 cy=%2210.2%22 r=%22.8%22 fill=%22black%22 stroke=%22none%22/%3E%3C/svg%3E"); }
  body[data-site-scene="forest"] :is(details.scene-dock, details.reading-scene-picker) { --scene-mark: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 1.8l3.6 5H9.8l3 4H3.2l3-4H4.4zM8 10.8v3.7%22/%3E%3C/svg%3E"); }
  body[data-site-scene="nyc"] :is(details.scene-dock, details.reading-scene-picker) { --scene-mark: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2 14.5V8h3V3.5h4.5v11M9.5 14.5V6.5h4.5v8M1 14.5h14%22/%3E%3C/svg%3E"); }
  body[data-site-scene="treetop"] :is(details.scene-dock, details.reading-scene-picker) { --scene-mark: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 1.8v2.6M8 11.6v2.6M1.8 8h2.6M11.6 8h2.6M3.6 3.6l1.8 1.8M10.6 10.6l1.8 1.8M12.4 3.6l-1.8 1.8M5.4 10.6l-1.8 1.8%22/%3E%3Ccircle cx=%228%22 cy=%228%22 r=%221.7%22 fill=%22black%22 stroke=%22none%22/%3E%3C/svg%3E"); }

  /* level with the Previous / Next text: the bar's middle, 39px up (plus the phone's home-indicator inset) */
  body[data-site-scene].home-view .forest-landing details.scene-dock,
  body[data-site-scene] .reading-scene-bar {
    bottom: calc(39px + env(safe-area-inset-bottom, 0px) - 18px) !important;
  }

  body[data-site-scene].home-view .forest-landing details.scene-dock > summary,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker > summary {
    width: auto !important; min-width: 0 !important;
    height: 36px !important; min-height: 36px !important;
    padding: 0 8px !important; margin: 0 !important; gap: 7px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    color: #fff !important;
    font: 400 13px / 1 Arial, Helvetica, sans-serif !important; letter-spacing: normal !important;
    white-space: nowrap !important;
  }
  body[data-site-scene].home-view .forest-landing details.scene-dock > summary::before,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker > summary::before { display: none !important; }
  body[data-site-scene].home-view .forest-landing details.scene-dock > summary .scene-flavor-hint { display: none !important; }

  /* the current scene's picture, drawn in the text colour */
  body[data-site-scene].home-view .forest-landing details.scene-dock > summary > .current-scene-name,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker > summary > .current-scene-name {
    order: -1; display: block !important; flex: none;
    width: 16px; height: 16px; margin: 0 !important; overflow: hidden;
    font-size: 0 !important; color: inherit !important;
    background: currentColor;
    -webkit-mask: var(--scene-mark) center / contain no-repeat; mask: var(--scene-mark) center / contain no-repeat;
  }

  /* a small chevron in place of "+" (home: the .scene-dock-mark span; reading pages: ::after) */
  body[data-site-scene].home-view .forest-landing details.scene-dock > summary .scene-dock-mark,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker > summary::after {
    content: "" !important; display: block !important; flex: none;
    width: 6px !important; height: 6px !important; margin: 4px 0 0 1px !important;
    font-size: 0 !important; background: none !important; color: inherit !important;
    border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
    transform: rotate(-135deg); transition: transform .2s ease, margin .2s ease;
  }
  body[data-site-scene].home-view .forest-landing details.scene-dock[open] > summary .scene-dock-mark,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker[open] > summary::after { transform: rotate(45deg); margin-top: -3px !important; }
  body[data-site-scene].home-view .forest-landing details.scene-dock[open] > summary,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker[open] > summary { text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: 5px !important; }
  body[data-site-scene].home-view .forest-landing details.scene-dock > summary:focus-visible,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker > summary:focus-visible { outline: 2px solid #fff !important; outline-offset: 3px !important; border-radius: 3px !important; }

  /* the panel opens centred over the bar */
  body[data-site-scene].home-view .forest-landing details.scene-dock > .scene-dock-panel,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker > .reading-scene-options {
    left: 50% !important; right: auto !important; margin-left: 0 !important; transform: translateX(-50%) !important;
  }
}

@media (max-width: 680px) and (prefers-reduced-motion: reduce) {
  body[data-site-scene].home-view .forest-landing details.scene-dock > summary .scene-dock-mark,
  body[data-site-scene] .reading-scene-bar details.reading-scene-picker > summary::after { transition: none; }
}
