/* -----------------------
   PC 用：左サイド固定
------------------------ */
.lunaria-sidebar-menu {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 60px;
  background: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1em 0;
  z-index: 1000;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  border-radius: 0 8px 8px 0;
}

/* メニューアイテム */
.sidebar-menu-item {
  position: relative;
  width: 48px;
  height: 48px;
  margin: 0.5em 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  background-color: #f5f5f5;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}

/* ホバー効果 */
.sidebar-menu-item:hover {
  background: #19568d;
  color: #fff;
}

/* ホバーポップアップ */
.sidebar-menu-item:hover::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 60px;
  transform: translateY(-50%);
  background: #19568d;
  color: #fff;
  padding: 0.4em 0.9em;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.9em;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* アイコンスタイル */
.sidebar-menu-item i {
  background-color: var(--icon-bg, transparent);
  border-radius: 4px;
  padding: 0.2em;
}
.sidebar-menu-item:hover i {
  background-color: var(--icon-hover-bg, transparent);
}

/* バリエーション */
.sidebar-menu-item.line:hover::after {
  background-color: #00c300;
}
.sidebar-menu-item.facebook:hover::after {
  background-color: #1877f2;
}
.sidebar-menu-item.phone:hover::after {
  background-color: #4caf50;
}

/* -----------------------
   モバイル用：下部固定ナビ
------------------------ */
@media (max-width: 768px) {
  .lunaria-sidebar-menu {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
    flex-direction: row;
    justify-content: space-around;
    border-radius: 0;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    background: #fff;
    padding: 0.5em 0;
  }

  .sidebar-menu-item {
    margin: 0;
    flex: 1;
    border-radius: 0;
    height: auto;
    background: none;
  }

  .sidebar-menu-item:hover::after {
    display: none;
  }

  .sidebar-menu-item i {
    font-size: 1.2rem;
  }
}

html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .lunaria-sidebar-menu {
    bottom: 0;
    margin-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0); /* iPhone対応 */
  }

  body {
    padding-bottom: 60px; /* ← 下部ナビの高さぶんスペース確保（被らないように） */
  }
}