.mobile-tabbar { display: none; }
@media (max-width: 768px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  .site-header .icon-row, .site-header .hamburger-btn { display: none !important; }
  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    inset: auto 0 0;
    z-index: 2000;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #dce8ea;
    box-shadow: 0 -3px 14px rgba(38, 65, 70, .05);
  }
  .mobile-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 61px;
    padding: 5px 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #61767c;
    font-size: 11px;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
  }
  .mobile-tab i { font-size: 26px; }
  /* PC画像の透明な余白を除いた絵柄が約28pxに見えるよう拡大する。 */
  .mobile-tab-icon { display: block; width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; transform: scale(2.8); pointer-events: none; }
  .mobile-tab-icon[src*="header_3_search"] { transform: scale(2.7); }
  .mobile-tab-icon[src*="header_4_write"] { transform: scale(3); }
  .mobile-tab-icon[src*="header_5_chat"] { transform: scale(2.3); }
  .mobile-tab-icon[src*="header_6_account"] { transform: scale(2); }
  .mobile-account-avatar { display: block; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
  .mobile-tab:hover, .mobile-tab:focus-visible { color: #147e85; text-decoration: none; }
  .mobile-tab[aria-current="page"], .mobile-tab[aria-expanded="true"] { color: #147e85; background: #eaf8f8; }
  .mobile-tab[aria-current="page"] span { font-weight: 700; }
  .mobile-dm-badge {
    position: absolute; top: 0; left: calc(50% + 4px);
    min-width: 18px; padding: 2px 4px; border-radius: 12px;
    background: #16838a; color: #fff; font-size: 10px; text-align: center;
  }
  .mobile-dm-badge[hidden] { display: none; }
  .hamburger-drawer {
    display: block; position: fixed; inset: 0; z-index: 3000;
    background: rgba(0, 0, 0, .35); visibility: hidden; opacity: 0; pointer-events: none;
  }
  body.menu-open { overflow: hidden; }
  body.menu-open .hamburger-drawer { visibility: visible; opacity: 1; pointer-events: auto; }
  .hamburger-drawer::before { display: none; }
  .hamburger-panel {
    position: absolute; inset: auto 0 0; width: 100%;
    max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-radius: 20px 20px 0 0; background: #fff;
  }
  .hamburger-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #e4edef; }
  .hamburger-close { min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 28px; }
  .hamburger-links { padding: 8px 16px 16px; }
  .hamburger-links a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; color: #293b41; border-radius: 10px; }
  .hamburger-links a:hover { background: #eaf8f8; text-decoration: none; }
  body.theme-dark .mobile-tabbar { background: #1b2026; border-color: #343b44; }
  body.theme-dark .mobile-tab { color: #b9c8cc; }
  body.theme-dark .mobile-tab[aria-current="page"], body.theme-dark .mobile-tab[aria-expanded="true"] { color: #80d5d8; background: #263b3f; }
}
