/* ==== 共通リセットとレイアウト ==== */
body {
  margin: 0;
  font-family: "Rounded M+ 1c", sans-serif;
  background-color: #f9f9f9;
}

/* ==== ヘッダー ==== */
.header {
  position: relative;
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 15px;
}

.header-icon {
  width: 30px;
  height: 30px;
}

/* ==== フッター ==== */
.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 60px;
  background-color: #e6f3fb; /* 薄い水色 */
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.footer a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  transition: filter 0.2s ease, transform 0.08s ease;
}

/* マウスホバー & キーボードフォーカスで「濃く」見せる */
.footer a:hover img,
.footer a:focus-visible img {
  filter: saturate(1.25) contrast(1.1) brightness(1.05);
  transform: translateY(-1px) scale(1.03);
}

/* クリック（タップ）中の押し込み感 */
.footer a:active img {
  filter: saturate(1.1) contrast(1.05) brightness(0.98);
  transform: translateY(0) scale(0.98);
}

/* タップ時の青いハイライトを消す（任意） */
.footer a {
  -webkit-tap-highlight-color: transparent;
}

.footer a img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.user-info-icon {
  height: 20px;
  vertical-align: middle;
  margin-right: 4px;
}

.footer a[aria-current="page"] img {
  /* 色を抜く + コントラスト上げ + ちょい暗く */
  filter: grayscale(0.1) contrast(1.35) brightness(0.7);
}

/* ==== 検索フォーム ==== */
.search-form {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.search-form input {
  padding: 8px;
  font-size: 16px;
  width: 60%;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.search-form button {
  padding: 8px 12px;
  font-size: 16px;
  border: none;
  background-color: #3498db;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.search-form button:hover {
  background-color: #2980b9;
}

body {
  padding-bottom: 80px; /* ← フッターと被らないよう余白確保 */
}

main.main-content {
  padding-bottom: 80px; /* mainがあるページではこちらでもOK */
}

/* 共通にする例 */
.site-wide main, .site-wide header, .site-wide footer {
  max-width: 600px;
  margin: 0 auto;
}
.footer {
  left: 0;
  right: 0;
}

/* common.css に追記またはselect-osi.cssに上書きで追加 */
footer.footer {
  max-width: 500px;
  margin: 0 auto;
}

#user-info {
  display: inline-flex;          /* アイコンと数字を横並び */
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 20px;

  /* 薄い水色のグラデーション（中央濃いめ、上下薄め） */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.3) 0%,   /* 上端 → 薄い */
    rgba(205, 229, 250, 0.8) 50%,  /* 中央 → 少し濃い */
    rgba(255, 255, 255, 0.3) 100%  /* 下端 → 薄い */
  );

  /* 薄い枠線 */
  border: 1px solid rgba(140, 180, 220, 0.5);
}

/* 親に中央寄せを指示 */
.user-info-wrapper {
  text-align: center;
  margin: 10px 0;
}

/* ページ切り替え時フェード */
#fade-overlay {
  position: fixed;
  inset: 0;
  background: #fff;      /* 背景色に合わせる（darkモードなら #111 などに） */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

#fade-overlay.active {
  opacity: 1;
  pointer-events: auto; /* 遷移中のクリック防止 */
}

/* ページネーションのためのcss */
/* ===== FF Pager (template) ===== */
.ff-pager-wrap{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--ff-pager-bottom, 84px);
  z-index: 2000;

  width: calc(100% - 16px);
  max-width: 410px;
}

.ff-pager{
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 8px;

  background: rgba(255,255,255,0.82);
  border-radius: 14px;
  padding: 10px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.ff-pager-btn{
  height: 40px;
  width: 56px;
  border-radius: 12px;
  border: none;
  background: rgba(0,0,0,0.08);
  font-weight: 900;
  color: #35658F;
}
.ff-pager-btn:disabled{ opacity: 0.4; }

.ff-pager-list{
  list-style: none;
  padding: 0 2px;
  margin: 0;

  display: flex;
  gap: 6px;
  align-items: center;

  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;

  max-width: 100%;
}
.ff-pager-list::-webkit-scrollbar{ display:none; }

.ff-pager-page{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: rgba(0,0,0,0.08);
  font-weight: 900;
  flex: 0 0 auto;
  color: #35658F;
}
.ff-pager-page.is-active{ background: rgba(0,0,0,0.18); }

.ff-pager-ellipsis{
  width: 22px;
  text-align: center;
  font-weight: 900;
  opacity: 0.7;
  flex: 0 0 auto;
}

@media (max-width: 360px){
  .ff-pager-wrap{
    width: calc(100% - 12px);
    bottom: var(--ff-pager-bottom-sm, 82px);
  }
  .ff-pager{
    grid-template-columns: 54px 1fr 54px;
  }
  .ff-pager-btn{
    width: 54px;
    height: 38px;
  }
  .ff-pager-page{
    width: 34px;
    height: 34px;
  }
}

#user-info{
  white-space: nowrap; /* 折返し禁止 */
  line-height: 1;
}

/* =========================================
   ✅ 赤い点（通知ドット）
   - JSで対象要素に .ff-dot-host を付与し、子に .ff-red-dot を追加する
   - innerHTML不要（DOM追加で安全）
   ========================================= */

.ff-dot-host{
  position: relative !important;
}

.ff-red-dot{
  position: absolute;
  top: 6px;
  right: 6px;

  width: 10px;
  height: 10px;
  border-radius: 999px;

  background: #ff3b30;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.95),
    0 2px 6px rgba(0,0,0,0.20);

  pointer-events: none;
}

/* フッターのアイコンは少し内側に寄せる（見切れ防止） */
.footer a.ff-dot-host .ff-red-dot{
  top: 6px;
  right: 10px;
}
