/* PWAでのみ表示。通常のSafari/Chromeのバーは変更しない */
#basha-pwa-nav[hidden], html:not(.basha-pwa-standalone) #basha-pwa-nav { display:none !important; }
html.basha-pwa-standalone { --basha-nav-bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) - 10px)); --basha-nav-height: 56px; --basha-nav-gap: 6px; }
html.basha-pwa-standalone body { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)) !important; }
/* 標準フッター: 下スクロールで通常表示、上スクロールでPWAナビの上に移動、先頭では非表示 */
@media (max-width:767px) {
  html.basha-pwa-standalone.basha-pwa-mode-top #dp-footer-bar { opacity:0 !important; visibility:hidden !important; pointer-events:none !important; transform:translateY(110%) !important; }
  html.basha-pwa-standalone.basha-pwa-mode-down #dp-footer-bar { bottom:0 !important; }
  /* 2段表示時は標準フッターから画面下端まで白い背景をつなげる。 */
  html.basha-pwa-standalone.basha-pwa-mode-up #dp-footer-bar {
    background:#fff !important;
    box-shadow:0 -3px 12px rgba(0,0,0,.06) !important;
  }
  html.basha-pwa-standalone.basha-pwa-mode-up #dp-footer-bar::after {
    content:"";
    position:absolute;
    left:0; right:0; top:100%;
    height:calc(var(--basha-nav-bottom) + var(--basha-nav-height) + var(--basha-nav-gap) + 2px);
    background:#fff;
    pointer-events:none;
  }
  html.basha-pwa-standalone #dp-footer-bar {
    transition:bottom .38s cubic-bezier(.22,1,.36,1), transform .38s cubic-bezier(.22,1,.36,1), opacity .32s ease, visibility .32s ease !important;
    will-change:transform,bottom;
  }
  html.basha-pwa-standalone.basha-pwa-mode-up #dp-footer-bar {
    position:fixed !important;
    bottom:calc(var(--basha-nav-bottom) + var(--basha-nav-height) + var(--basha-nav-gap) ) !important;
    transform:translateY(0) !important; opacity:1 !important; visibility:visible !important;
    z-index:9998 !important;
  }
}
#basha-pwa-nav {
  position:fixed !important;
  left:16px !important; right:16px !important;
  bottom:var(--basha-nav-bottom, 24px) !important;
  z-index:9999 !important;
  display:flex !important; align-items:center !important; justify-content:space-around !important;
  height:var(--basha-nav-height, 56px) !important;
  box-sizing:border-box !important;
  padding:4px 8px !important;
  border:1px solid rgba(255,255,255,.30) !important;
  border-radius:999px !important;
  background:rgba(105,105,105,.88) !important;
  box-shadow:0 3px 15px rgba(0,0,0,.18) !important;
  -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px);
  color:#fff !important;
  transform:translateY(0); opacity:1;
  transition:transform .38s cubic-bezier(.22,1,.36,1), opacity .32s ease, visibility .32s ease !important;
  visibility:visible; font-family:inherit !important;
  will-change:transform,opacity;
}
#basha-pwa-nav.basha-pwa-nav-hide {
  transform:translate3d(0,calc(100% + 60px),0) !important;
  opacity:0 !important; visibility:hidden !important; pointer-events:none !important;
}
#basha-pwa-nav > button, #basha-pwa-nav > a {
  -webkit-appearance:none !important; appearance:none !important;
  border:0 !important; border-radius:999px !important;
  box-shadow:none !important; background:transparent !important;
  color:#fff !important; text-decoration:none !important;
  display:flex !important; flex:1 1 0 !important; min-width:0 !important;
  height:52px !important; padding:2px 8px !important; margin:0 !important;
  align-items:center !important; justify-content:center !important;
  flex-direction:row !important; gap:0 !important;
  font-size:11px !important; line-height:1.2 !important; font-weight:500 !important;
  cursor:pointer; touch-action:manipulation;
}
#basha-pwa-nav svg { width:30px !important; height:30px !important; fill:none !important; stroke:currentColor !important; stroke-width:1.9 !important; stroke-linecap:round !important; stroke-linejoin:round !important; flex-shrink:0 !important; }
#basha-pwa-nav > button:disabled { opacity:.35 !important; cursor:default !important; }
#basha-pwa-nav > a:active, #basha-pwa-nav > button:not(:disabled):active { background:rgba(255,255,255,.15) !important; }
@media (prefers-reduced-motion:reduce) { #basha-pwa-nav { transition:none !important; } }

/* 履歴戻る・進むで復元中だけ、バー2本のスライドを完全に停止。 */
html.basha-pwa-standalone.basha-pwa-nav-restoring #basha-pwa-nav,
html.basha-pwa-standalone.basha-pwa-nav-restoring #dp-footer-bar {
  transition:none !important;
  animation:none !important;
}
