body {
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
}

/* メインコンテナ */
main.container {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 64px;
}

h2 {
  text-align: left;
  margin-bottom: 0;
}

.title-block {
  margin-top: 20px;     /* ✅ ナビゲーションバーとの距離を song_detail と揃える */
  margin-bottom: 16px;  /* ✅ 下の要素との余白も統一 */
  text-align: center;
}

/* 列幅指定 */
.songs-table th.col-title {
  width: 60%;
}

.songs-table th.col-date,
.songs-table th.col-last,
.songs-table th.col-count {
  width: 13%;
  white-space: nowrap;
}

/* ソート可能列 */
.songs-table th.sortable {
  cursor: pointer;
  text-decoration: underline;
  color: var(--accent);
}

.songs-table td a:hover {
  text-decoration: underline;
}

/* 最終歌唱日：中央揃え */
.songs-table td.last-sung {
  text-align: center;
  color: #333;
}

/* 歌唱回数：右揃え */
.songs-table td.sing-count {
  text-align: right;
  font-weight: 500;
  color: #222;
}

/* プレースホルダー（楽曲なし） */
.placeholder {
  text-align: center;
  padding: 1.5em;
  color: var(--text-light);
  font-size: 1em;
}

.songs-table-wrapper {
  position: relative;
  height: calc(100vh - 64px - 48px - 48px - 28px - 90px); /* ✅ ナビバー + ヘッダー + 見出し + ページネーション + 余白 */
  overflow-y: auto;
  /*overflow-x: hidden; */
  margin-bottom: 60px; /* ✅ ページネーションの高さ＋余白分を確保 */
}

.songs-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.songs-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg-hover);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 4px var(--shadow-light);
}

/* ヘッダ内のリンクは色を変更せず親要素（ヘッダ）の色を継承する */
.songs-table th a {
  color: inherit;
  text-decoration: none;
}
.songs-table th a:hover {
  text-decoration: underline;
}

.songs-table td {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.songs-table td.release-date {
  white-space: nowrap;           /* 改行を防ぐ */
  overflow: hidden;              /* はみ出しを防ぐ */
  text-overflow: ellipsis;       /* 省略記号を表示 */
  text-align: left;              /* 左寄せ */
  max-width: 120px;              /* 必要に応じて調整 */
}

.title-kana {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

/* 📄 ページネーション */
.pagination {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 28px;
  padding: 10px 0;
  text-align: center;
  z-index: 1000;
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 6px var(--shadow);
}

.pagination a {
  margin: 0 4px;
  padding: 6px 12px;
  font-size: 14px;
  text-decoration: none;
  color: var(--text);
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease;
}

.pagination a:hover {
  background-color: var(--bg-hover);
}

.pagination a.active {
  background-color: var(--main-mid);
  color: var(--text-light);
  border-color: var(--main-mid);
}

.songs-table td a {
  display: block; /* ✅ 統一 */
  color: var(--main-dark);
  text-decoration: none;
}

.ellipsis {
  display: inline-block;
  width: 100%; /* ✅ 統一 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  color: var(--main-dark);
}

.custom-tooltip {
  position: absolute;
  background-color: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px var(--shadow);
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 4px;
  white-space: normal;
  z-index: 9999;
  max-width: 400px;
  display: none;
}

.artist_name-text {
  font-size: 1.8em;
  text-align: center;
  margin-bottom: 0.3em;
  word-break: break-word;
}

.kana-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto 1em;
  padding: 0 12px;
}

.kana {
  font-size: 0.9em;
  color: var(--text-light);
  text-align: center;
  margin-right: 12px;
  flex: 1;
}
