/* Bob Wang Team — shared phone/tablet menu: small translucent drop-down under the menu button.
   Loaded last on every page so it overrides each page's older full-screen drawer rules. 2026-10-25 */
@media (max-width: 1000px) {
  html body #primary-nav {
    position: fixed; inset: var(--nav-top, 76px) var(--nav-right, 28px) auto auto;
    width: max-content; min-width: 132px; max-height: calc(100vh - var(--nav-top, 76px) - 16px); overflow-y: auto;
    background: rgba(22,24,30,0.5); padding: 4px 18px; gap: 0; align-items: stretch;
    flex-direction: column; justify-content: flex-start;
    box-shadow: 0 12px 30px rgba(12,18,32,0.30);
    transform: translateY(-6px); opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
    z-index: 100;
  }
  html body.nav-open #primary-nav { transform: translateY(0); opacity: 1; visibility: visible; transition: opacity .18s ease, transform .18s ease; }
  html body #primary-nav > a {
    font-family: var(--serif); font-weight: 400; font-size: 16px !important; letter-spacing: 0.01em !important; text-transform: none;
    text-align: right; color: #fff; padding: 10px 0; width: auto; margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.22); text-shadow: 0 1px 8px rgba(0,0,0,0.45);
  }
  html body #primary-nav > a:last-of-type { border-bottom: none; }
  html body #primary-nav > a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.22); }
  html body #primary-nav > a[aria-current="page"] { color: rgba(212,184,120,1); border-bottom-color: rgba(255,255,255,0.22); }
  html[lang="zh"] body #primary-nav { min-width: 0; padding-left: 16px; padding-right: 16px; }
  html[lang="zh"] body #primary-nav > a { font-size: 15px !important; letter-spacing: 0.12em !important; padding-left: 22px; }
  html body #primary-nav .lang-toggle { display: none; }
  html body.nav-open { overflow: visible; }
  html body.nav-open::before { content: none; }
  html body.nav-open header { background: inherit; }
  /* the button keeps its three lines; tapping it again closes the list */
  html body.nav-open .nav-toggle span { transform: none !important; opacity: 1 !important; }
}
