/* === Dashboard === */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  grid-template-areas:
    "main side"
    "list1 list2"
    "list3 list4"
    "recent recent";
  gap: 12px;
  align-items: start;
}
.dashboard-grid > .card {
  min-width: 0;
}
.dashboard-main-stack {
  grid-area: main;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.dashboard-main-stack > .dashboard-lead,
.dashboard-main-stack > .dashboard-monthly-card {
  grid-area: auto;
}
.dashboard-card {
  height: auto;
  padding: 16px;
  border-radius: 12px;
}
.dashboard-lead {
  grid-area: lead;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.dashboard-card .card-title {
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.35;
  margin-bottom: 10px;
}
.dashboard-card .card-title .pill {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}
.dashboard-metric-list {
  display: grid;
  gap: 8px;
}
.dashboard-activity-card .activity-row,
.dashboard-summary-card .activity-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}
.dashboard-activity-card .activity-row strong,
.dashboard-summary-card .activity-row strong {
  color: var(--primary-strong);
  font-feature-settings: var(--tnum);
  white-space: nowrap;
}
.dashboard-top-card .bar-list,
.dashboard-card .bar-list {
  display: grid;
  gap: 2px;
}
.dashboard-side-card {
  grid-area: side;
  display: grid;
  gap: 16px;
  align-content: start;
}
.dashboard-side-section {
  min-width: 0;
}
.dashboard-side-section + .dashboard-side-section {
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.dashboard-monthly-card { grid-area: monthly; }
.dashboard-monthly-card {
  padding-bottom: 14px;
}
.dashboard-list-month { grid-area: list1; }
.dashboard-list-year { grid-area: list2; }
.dashboard-list-stale { grid-area: list3; }
.dashboard-list-recent { grid-area: list4; }
.dashboard-recent-card { grid-area: recent; }
@media (min-width: 760px) {
  .col-12 { grid-column: 1 / -1 !important; }
  .col-6 { grid-column: span 6 !important; }
  .col-4 { grid-column: span 4 !important; }
  .col-8 { grid-column: span 8 !important; }
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.analytics-grid > .card {
  min-width: 0;
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "side"
      "list1"
      "list2"
      "list3"
      "list4"
      "recent";
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .analytics-grid > .card {
    grid-column: 1 / -1 !important;
  }
}

.genre-meter {
  display: grid;
  gap: 10px;
}
.genre-meter-track {
  display: flex;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.genre-meter-segment {
  display: block;
  min-width: 4px;
}
.genre-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}
.genre-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
}
.genre-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
}
.genre-row strong {
  color: var(--primary-strong);
  font-feature-settings: var(--tnum);
}
.genre-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.g0 { background: var(--primary); }
.g1 { background: var(--accent); }
.g2 { background: var(--gold); }
.g3 { background: var(--primary-strong); }
.g4 { background: var(--accent-strong); }
.g5 { background: #7ad99c; }
.g6 { background: #d49a6a; }
.g7 { background: var(--primary-soft); }

.monthly-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  min-height: 118px;
}
.month-bar {
  display: grid;
  grid-template-rows: minmax(68px, 1fr) auto auto;
  gap: 3px;
  min-width: 0;
  text-align: center;
}
.month-bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 68px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.month-bar-track span {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}
.month-label {
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1;
  white-space: nowrap;
}
.month-bar strong {
  color: var(--primary-strong);
  font-size: 10.5px;
  font-feature-settings: var(--tnum);
}

/* Heatmap (calendar) */

.heatmap-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 12px);
  gap: 2px;
  min-height: 96px;
  width: max-content;
}
.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--surface-3);
  transition: transform 0.1s ease, outline 0.1s ease;
  cursor: default;
}
.heatmap-cell.l1 { background: #f0c6d8; }
.heatmap-cell.l2 { background: #d978a4; }
.heatmap-cell.l3 { background: #b95582; }
.heatmap-cell.l4 { background: #9f3f6d; }
:root[data-theme="dark"] .heatmap-cell,
:root[data-theme="auto"] .heatmap-cell { background: #2a2029; }
:root[data-theme="dark"] .heatmap-cell.l1,
:root[data-theme="auto"] .heatmap-cell.l1 { background: #563246; }
:root[data-theme="dark"] .heatmap-cell.l2,
:root[data-theme="auto"] .heatmap-cell.l2 { background: #9f3f6d; }
:root[data-theme="dark"] .heatmap-cell.l3,
:root[data-theme="auto"] .heatmap-cell.l3 { background: #d978a4; }
:root[data-theme="dark"] .heatmap-cell.l4,
:root[data-theme="auto"] .heatmap-cell.l4 { background: #9f3f6d; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .heatmap-cell { background: #2a2029; }
  :root[data-theme="auto"] .heatmap-cell.l1 { background: #563246; }
}

.heatmap-cell:hover { transform: scale(1.5); outline: 2px solid var(--ink); }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-soft);
}
.heatmap-legend .scale {
  display: flex;
  gap: 3px;
}
.heatmap-legend .scale .heatmap-cell {
  width: 12px; height: 12px;
}

.heatmap-months {
  display: flex;
  font-size: 10px;
  color: var(--ink-soft);
  margin-top: 4px;
  padding-left: 24px;
  user-select: none;
}

.heatmap-row-labels {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 2px;
  font-size: 9px;
  color: var(--ink-soft);
  text-align: right;
  padding-right: 4px;
}

.heatmap-flex {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

/* === Podium === */

.podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
.podium-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 14px 16px;
  text-align: center;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.podium-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.podium-card.rank-1 { border-color: var(--gold); transform: translateY(-6px); }
.podium-card.rank-2 { border-color: var(--silver); }
.podium-card.rank-3 { border-color: var(--bronze); }
.podium-card.rank-1:hover { transform: translateY(-10px); }
.podium-medal {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  color: var(--ink);
  background: var(--primary-soft);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.podium-card.rank-1 .podium-medal {
  color: #5e4311;
  background: linear-gradient(180deg, #fff4be, var(--gold));
  border-color: #d3a22b;
}
.podium-card.rank-2 .podium-medal {
  color: #34445a;
  background: linear-gradient(180deg, #f7fbff, #c8d3df);
  border-color: #aab8c6;
}
.podium-card.rank-3 .podium-medal {
  color: #5a341b;
  background: linear-gradient(180deg, #ffe0c4, #d9955b);
  border-color: #c17e4a;
}
.podium-card .song-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
  word-break: break-word;
  line-height: 1.4;
}
.podium-card .song-artist {
  font-size: 11.5px;
  color: var(--ink-mute);
  margin-bottom: 10px;
  word-break: break-word;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: center;
}
.podium-card .song-artist:hover {
  color: var(--primary-strong);
  text-decoration: underline;
}
.podium-card .count-big {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-strong);
  line-height: 1;
  font-feature-settings: var(--tnum);
}
.podium-card .count-big small {
  font-size: 12px;
  color: var(--ink-mute);
  font-weight: 500;
  margin-left: 2px;
}
.podium-card .last-sung {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--ink-mute);
}

/* === Song list (rows) === */

.song-list {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-soft);
  contain: layout style;
}
.songs-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
body[data-audience="listener"] #setlist-planner,
body[data-audience="listener"] [data-mobile-panel-toggle="setlist"] {
  display: none !important;
}
.recommend-box {
  margin: 8px 0 12px;
}
.recommend-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-soft), var(--surface));
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  position: relative;
}
.recommend-dismiss {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-mute);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.recommend-dismiss:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.recommend-label {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.recommend-card strong {
  color: var(--ink);
  margin-right: 4px;
}
.recommend-card span {
  color: var(--ink-soft);
  font-size: 12px;
}
.recommend-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.recommend-meta span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.setlist-planner {
  margin: 10px 0 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.setlist-planner[hidden] { display: none; }
.setlist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.setlist-head h3 {
  font-size: 16px;
  color: var(--ink);
}
.setlist-total {
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.setlist-theme {
  width: 100%;
  margin-bottom: 10px;
}
/* ── セトリ曲検索 ─────────────────── */
.setlist-search-add {
  margin-bottom: 8px;
}
.setlist-search-wrap {
  position: relative;
}
.setlist-search-input {
  width: 100%;
}
.setlist-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  z-index: 200;
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}
.setlist-dd-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.1s;
}
.setlist-dd-item:last-child { border-bottom: none; }
.setlist-dd-item:hover,
.setlist-dd-item.is-selected {
  background: var(--surface-2);
}
.setlist-dd-icon,
.setlist-dd-plus {
  font-size: 14px;
  text-align: center;
  color: var(--ink-mute);
}
.setlist-dd-body { min-width: 0; }
.setlist-dd-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.setlist-dd-meta {
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.setlist-dd-new { background: var(--surface-2); }
.setlist-dd-new .setlist-dd-title { color: var(--primary-strong); }
.setlist-dd-new .setlist-dd-plus {
  color: var(--primary-strong);
  font-size: 18px;
  font-weight: 700;
}
.setlist-custom-details {
  margin-top: 6px;
}
.setlist-custom-details summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  user-select: none;
  list-style: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  box-sizing: border-box;
  transition: background 0.1s, border-color 0.1s;
}
.setlist-custom-details summary:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--ink);
}
.setlist-custom-details summary::before {
  content: '';
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  flex: none;
}
.setlist-custom-details summary::after {
  content: '›';
  margin-left: auto;
  font-size: 16px;
  color: var(--ink-mute);
  transition: transform 0.2s;
  line-height: 1;
}
.setlist-custom-details[open] summary::after {
  transform: rotate(90deg);
}
.setlist-custom-details[open] summary {
  border-style: solid;
  border-color: var(--border-strong);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: none;
  background: var(--surface-2);
}
.setlist-custom-details[open] .setlist-custom-add {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* ── ドラッグハンドル ─────────────── */
.setlist-planner .setlist-drag-handle {
  cursor: grab;
  color: var(--ink-mute);
  font-size: 15px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  padding: 0;
  touch-action: none;
  user-select: none;
  line-height: 1;
  opacity: 0.6;
  border-radius: 999px;
  background: rgba(217, 120, 164, 0.08);
}
.setlist-planner .setlist-drag-handle:hover {
  opacity: 1;
  color: var(--primary-strong);
  background: var(--primary-soft);
}
.setlist-planner .setlist-drag-handle:active { cursor: grabbing; }

/* 並び替え（マイリストと同じ transform 追従方式） */
.setlist-planner .setlist-items.is-drag-active { user-select: none; }
.setlist-planner .setlist-items.is-drag-active .setlist-item { transition: transform 0.15s ease; }
.setlist-planner .setlist-item.is-dragging {
  transition: none !important; /* ドラッグ中の行はポインタへ即時追従 */
  position: relative;
  z-index: 10;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.setlist-custom-add {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.setlist-custom-add .text-input {
  width: 100%;
  min-width: 0;
}
.setlist-custom-row2 {
  display: flex;
  gap: 6px;
  align-items: center;
}
.setlist-custom-row2 .text-input {
  flex: 1;
  min-width: 0;
}
.setlist-custom-key-inp {
  flex: 0 0 68px !important;
  width: 68px;
  text-align: center;
}
.setlist-custom-add .btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding-inline: 16px;
  white-space: nowrap;
}
.setlist-balance,
.setlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.setlist-balance span,
.setlist-message {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}
.setlist-message {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.setlist-items {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.setlist-empty {
  color: var(--ink-mute);
  font-size: 12px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.setlist-planner .setlist-item {
  display: grid;
  grid-template-columns: 28px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: opacity 0.15s;
  cursor: grab; /* PC: 行のどこからでもドラッグして並び替え（タッチはハンドルのみ） */
}
.setlist-planner .setlist-item.is-dragging { cursor: grabbing; }
/* 操作ボタンは通常カーソル */
.setlist-planner .setlist-item .setlist-move button,
.setlist-planner .setlist-item .setlist-copy-one { cursor: pointer; }
.setlist-planner .setlist-no {
  grid-column: 1;
  grid-row: 1;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.setlist-planner .setlist-info {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}
.setlist-planner .setlist-drag-handle {
  grid-column: 2;
  grid-row: 1;
}
.setlist-planner .setlist-info strong,
.setlist-planner .setlist-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.setlist-planner .setlist-info strong {
  color: var(--ink);
  font-size: 12.5px;
}
.setlist-planner .setlist-info span {
  color: var(--ink-mute);
  font-size: 11px;
}
.setlist-planner .setlist-move {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  gap: 4px;
}
.setlist-planner .setlist-move button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 800;
}
.setlist-planner .setlist-move button:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}
.setlist-planner .setlist-move .setlist-copy-one {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}
.song-row {
  display: grid;
  grid-template-columns: 52px 1fr 90px 120px;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.12s ease;
  gap: 10px;
}
.song-row:last-child { border-bottom: none; }
.song-row:hover { background: var(--surface-2); }
.song-row .rank {
  font-weight: 700;
  color: var(--primary-strong);
  font-size: 16px;
  text-align: center;
  font-feature-settings: var(--tnum);
}
.song-row .rank.r1 { color: var(--gold); }
.song-row .rank.r2 { color: var(--silver); }
.song-row .rank.r3 { color: var(--bronze); }
.song-row .info { min-width: 0; }
.song-row .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}
.song-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.song-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.song-row .artist {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
  word-break: break-word;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline;
  padding: 0;
  text-align: left;
}
.song-row .artist:hover {
  color: var(--primary-strong);
  text-decoration: underline;
}
.song-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.genre-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.song-key-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  min-height: 24px;
}
.song-key-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 6px 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 11px;
  line-height: 1.2;
  cursor: default;
}
.song-key-badge span {
  color: var(--ink-mute);
  font-weight: 600;
}
.song-key-badge strong {
  color: var(--accent-strong);
  font-size: 12px;
  font-feature-settings: var(--tnum);
}
.song-key-empty {
  color: var(--ink-mute);
  font-size: 11px;
}
.song-key-actions {
  display: inline-flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: fit-content;
  max-width: 100%;
}
.setlist-add-btn {
  --setlist-add-bg: #f7dce8;
  --setlist-add-border: #d978a4;
  --setlist-add-text: #9f3f6d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 24px;
  border: 1px solid var(--setlist-add-border);
  border-radius: 999px;
  background: var(--setlist-add-bg);
  color: var(--setlist-add-text);
  padding: 2px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.setlist-add-btn:hover {
  border-color: var(--primary-strong);
  background: var(--surface);
  color: var(--primary-strong);
}
.setlist-add-btn:active {
  transform: scale(0.96);
}
.song-row .count {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-strong);
  text-align: right;
  font-feature-settings: var(--tnum);
}
.song-row .count small {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
  margin-left: 1px;
}
.song-row-side {
  display: contents;
}
.song-row .last {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-mute);
  text-align: right;
  line-height: 1.4;
  white-space: nowrap;
}
.fav-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-mute);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}
.fav-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.fav-btn.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface));
  color: var(--accent-strong);
}
.fav-btn:active {
  transform: scale(0.94);
}
.tag-badge,
.match-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.tag-click {
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.tag-click:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-strong);
}
.match-badge {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
}
.song-list.compact .song-row {
  grid-template-columns: 44px 1fr 70px;
  padding: 9px 14px;
}
.song-list.compact .song-row .last,
.song-list.compact .song-key-line {
  display: none;
}
.song-list.compact .song-row .title {
  font-size: 13px;
}
.song-list.compact .song-row .artist,
.song-list.compact .tag-badge,
.song-list.compact .match-badge {
  font-size: 10.5px;
}

@media (max-width: 600px) {
  .podium-card,
  .songs-list,
  .recommend-card,
  .song-row,
  .activity-row,
  .bar-list .bar-row {
    min-width: 0;
  }
  .recommend-card strong,
  .song-key-badge strong {
    overflow-wrap: anywhere;
  }
  .song-key-badge {
    max-width: 100%;
  }
  .songs-tools {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin: 6px 0 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .songs-tools::-webkit-scrollbar {
    display: none;
  }
  body[data-audience="singer"] .songs-tools {
    margin-top: 4px;
    margin-bottom: 6px;
  }
  .songs-tools .btn {
    flex: 0 0 auto;
    justify-content: center;
    min-height: 30px;
    padding: 4px 9px;
    font-size: 11px;
    white-space: nowrap;
  }
  body[data-audience="listener"] .songs-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }
  body[data-audience="singer"] .mobile-panel-filters > .controls:first-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }
  body[data-audience="singer"] .mobile-panel-filters > .controls:first-child .text-input {
    grid-column: 1 / -1;
  }
  body[data-audience="singer"] .mobile-panel-filters > .controls:first-child .select-input,
  body[data-audience="singer"] .mobile-panel-filters > .controls:first-child .genre-select {
    min-height: 34px;
    width: 100%;
    font-size: 12px;
  }
  body[data-audience="singer"] .search-help {
    display: none;
  }
  body[data-audience="singer"] #songs-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin: 0 0 6px !important;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  body[data-audience="singer"] #songs-filters::-webkit-scrollbar {
    display: none;
  }
  body[data-audience="singer"] #songs-filters .btn {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 4px 9px;
    font-size: 11px;
    white-space: nowrap;
  }
  body[data-audience="singer"] .genre-strip {
    margin: 0 0 8px;
    gap: 6px;
  }
  body[data-audience="singer"] .genre-chip {
    min-height: 26px;
    padding: 3px 9px;
    font-size: 11px;
  }
  .dashboard-grid { gap: 10px; }
  .dashboard-lead { grid-template-columns: 1fr; gap: 10px; }
  .dashboard-card { padding: 13px; border-radius: 12px; }
  .dashboard-card .card-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .dashboard-card .card-title .pill {
    font-size: 10px;
    padding: 1px 7px;
  }
  .dashboard-activity-card .activity-row,
  .dashboard-summary-card .activity-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }
  .genre-breakdown {
    grid-template-columns: 1fr;
  }
  .monthly-bars {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: 150px;
  }
  .month-bar {
    grid-template-rows: minmax(48px, 1fr) auto auto;
  }
  .month-bar-track {
    min-height: 48px;
  }
  .podium {
    grid-template-columns: repeat(3, minmax(84px, 1fr));
    gap: 6px;
  }
  .podium-card,
  .podium-card.rank-1,
  .podium-card.rank-1:hover {
    transform: none;
  }
  .podium-card:hover {
    transform: translateY(-2px);
  }
  .podium-card {
    padding: 12px 6px 10px;
  }
  .podium-medal {
    width: 26px;
    height: 26px;
    font-size: 13px;
    margin-bottom: 5px;
  }
  .podium-card .song-title {
    font-size: 12px;
    line-height: 1.35;
  }
  .podium-card .song-artist {
    font-size: 10px;
    margin-bottom: 7px;
  }
  .podium-card .count-big {
    font-size: 20px;
  }
  .podium-card .last-sung {
    font-size: 9.5px;
  }
  .song-row {
    grid-template-columns: 34px minmax(0, 1fr) minmax(108px, auto);
    grid-template-rows: auto auto;
    gap: 2px 8px;
    padding: 9px 12px;
  }
  .song-row .rank { grid-row: 1 / 3; align-self: start; padding-top: 2px; font-size: 14px; }
  .song-row .info { grid-column: 2; }
  .song-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: start;
    gap: 1px;
    min-width: 108px;
  }
  .song-row .count {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    font-size: 13px;
    line-height: 1.2;
  }
  .song-row .last {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    font-size: 10.5px;
    line-height: 1.25;
    margin-top: 18px;
  }
  .song-row .title {
    line-height: 1.35;
  }
  .song-row .artist {
    margin-top: 0;
    line-height: 1.35;
  }
  .song-meta-line,
  .song-key-line {
    margin-top: 4px;
  }
  body[data-audience="singer"] .song-meta-line,
  body[data-audience="singer"] .song-key-line {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 0;
    overflow: hidden;
  }
  body[data-audience="singer"] .genre-badge,
  body[data-audience="singer"] .tag-badge,
  body[data-audience="singer"] .match-badge,
  body[data-audience="singer"] .song-key-badge,
  body[data-audience="singer"] .song-key-empty {
    flex: 0 0 auto;
    justify-content: flex-start;
    width: auto;
    min-width: 0;
    text-align: left;
  }
  body[data-audience="singer"] .song-key-badge {
    gap: 4px;
  }
  body[data-audience="singer"] .song-key-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
  body[data-audience="singer"] .song-key-actions .song-key-badge,
  body[data-audience="singer"] .song-key-actions .song-key-empty {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  body[data-audience="singer"] .song-key-actions .song-key-badge strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-audience="singer"] .setlist-add-btn {
    min-height: 24px;
    border-color: var(--setlist-add-border);
    background: var(--setlist-add-bg);
    color: var(--setlist-add-text);
    padding: 2px 9px;
    font-size: 11px;
  }
  body[data-audience="singer"] .song-meta-line .tag-badge:nth-of-type(n + 5),
  body[data-audience="singer"] .song-meta-line .match-badge {
    display: none;
  }
  .genre-badge,
  .tag-badge,
  .match-badge {
    min-height: 20px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  .song-key-badge {
    min-height: 20px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  body[data-audience="singer"] .genre-badge,
  body[data-audience="singer"] .tag-badge,
  body[data-audience="singer"] .song-key-badge,
  body[data-audience="singer"] .song-key-empty {
    min-height: 22px;
    padding: 2px 9px;
    font-size: 11px;
    line-height: 1.2;
  }
  .song-list.compact .song-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
  .recommend-card {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 46px;
  }
  .recommend-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
  }
  .recommend-meta {
    justify-content: flex-start;
  }
  .setlist-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .setlist-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    margin-top: 8px;
  }
  .setlist-actions .select-input {
    grid-column: 1 / -1;
    width: 100%;
    height: 34px;
  }
  .setlist-actions .btn {
    min-height: 32px;
    justify-content: center;
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  .setlist-actions .setlist-message {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .setlist-custom-add {
    padding: 8px;
    gap: 6px;
  }
  .setlist-custom-add .btn {
    padding: 5px 10px;
    font-size: 11px;
  }
  .setlist-custom-key-inp {
    flex: 0 0 56px !important;
    width: 56px;
  }
  .setlist-planner .setlist-item {
    grid-template-columns: 24px 28px minmax(0, 1fr);
  }
  .setlist-planner .setlist-info {
    grid-column: 3;
  }
  .setlist-planner .setlist-drag-handle {
    grid-column: 2;
  }
  .setlist-planner .setlist-move {
    grid-column: 3 / -1;
    grid-row: 2;
  }
}

/* === Timeline === */

.timeline {
  position: relative;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timeline-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: -4px 0 14px;
}
.timeline-sort-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}
.timeline-sort-field span {
  white-space: nowrap;
}
.timeline-sort-field .select-input {
  min-width: 190px;
  height: 36px;
}
.timeline-item {
  position: relative;
  margin: 0;
  background: var(--surface);
  border-radius: 10px;
  padding: 0;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.timeline-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.timeline-item.focus {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.timeline-summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  background: var(--surface);
}
.timeline-summary::-webkit-details-marker { display: none; }
.timeline-summary::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 14px;
  color: var(--ink-mute);
  font-size: 15px;
  transition: transform 0.14s;
}
.timeline-item[open] .timeline-summary::after {
  transform: rotate(180deg);
}
.timeline-date-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  background: var(--primary-strong);
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--primary-strong) 78%, #4c2437 22%);
  box-shadow: 0 3px 10px rgba(159, 63, 109, 0.24);
  font-size: 11px;
  font-weight: 900;
  font-feature-settings: var(--tnum);
}
.timeline-summary-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.stream-anchor {
  position: absolute;
  inset: 0 auto auto 0;
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.timeline-stream-no {
  font-size: 11px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
}
.timeline-songcount {
  font-size: 11px;
  color: var(--green-text);
  font-weight: 800;
}
.timeline-title {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 0;
  word-break: break-word;
  line-height: 1.5;
}
.timeline-title a {
  color: var(--primary-strong);
  border-bottom: 1px dashed var(--border-strong);
}
.timeline-title a:hover { border-bottom-style: solid; text-decoration: none; }

.watch-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.watch-open-link,
.watch-youtube-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--primary-strong) !important;
  padding: 0;
  font-family: inherit;
  font-size: 0;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.watch-open-link svg,
.watch-youtube-link svg,
.timeline-copy-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.watch-open-link:hover,
.watch-youtube-link:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
  text-decoration: none !important;
}
.watch-open-link {
  color: var(--primary-strong) !important;
}
.watch-youtube-link {
  color: var(--ink-soft) !important;
}
.timeline-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary-strong);
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.timeline-copy-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}
.timeline-copy-btn.is-copied {
  color: var(--green-text);
  border-color: var(--green-text);
  background: rgba(58, 165, 101, 0.12);
}
.timeline-copy-btn.is-error {
  color: var(--red);
  border-color: var(--red);
  background: rgba(218, 84, 102, 0.1);
}

/* ☆ プレイリスト保存ボタン */
.timeline-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-mute);
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.timeline-save-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(244, 196, 74, 0.08);
  transform: translateY(-1px);
}
.timeline-save-btn.is-saved {
  border-color: var(--gold);
  color: #9f7412;
  background: rgba(244, 196, 74, 0.18);
}

.timeline-setlist {
  padding: 14px 60px 18px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
}
.timeline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-right: 18px;
  flex-wrap: wrap;
}
.timeline-setlist .setlist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.timeline-setlist .setlist-item {
  display: grid;
  grid-template-columns: 30px minmax(0, max-content) auto minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  color: var(--ink-mute);
  font-size: 12px;
  line-height: 1.45;
}
.timeline-setlist .setlist-item.hit {
  color: var(--accent-strong);
  font-weight: 700;
}
.timeline-setlist .setlist-num {
  color: var(--ink-mute);
  font-size: 11px;
  font-weight: 700;
  font-feature-settings: var(--tnum);
  text-align: right;
}
.timeline-setlist .setlist-item.hit .setlist-num { color: var(--accent-strong); }
.timeline-setlist .setlist-title,
.timeline-setlist .setlist-artist {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}
.timeline-setlist .setlist-title {
  color: var(--ink-soft);
  font-weight: 700;
}
.timeline-setlist .setlist-artist {
  color: var(--ink-mute);
  font-size: 11.5px;
}
.timeline-setlist .setlist-title:hover,
.timeline-setlist .setlist-artist:hover {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.timeline-setlist .setlist-title:focus-visible,
.timeline-setlist .setlist-artist:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 3px;
}
.timeline-setlist .setlist-separator {
  color: var(--ink-mute);
}

.timeline-controls {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .timeline-tools {
    justify-content: stretch;
    margin: -2px 0 12px;
  }
  .timeline-sort-field {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }
  .timeline-sort-field .select-input {
    width: 100%;
    min-width: 0;
    height: 34px;
  }
  .timeline { padding-left: 0; gap: 10px; }
  .timeline-item {
    border-radius: 12px;
  }
  .timeline-summary {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 76px;
    padding: 13px 12px;
    gap: 9px;
  }
  .timeline-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
    padding-right: 0;
  }
  .timeline-date-badge { width: 32px; height: 32px; font-size: 10px; }
  .timeline-head {
    align-items: center;
    gap: 5px 6px;
    margin-bottom: 3px;
  }
  .timeline-stream-no,
  .timeline-songcount {
    font-size: 10.5px;
  }
  .timeline-title {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.35;
  }
  .timeline-setlist {
    padding: 10px 12px 14px;
  }
  .timeline-copy-btn {
    width: 26px;
    height: 26px;
    justify-content: center;
    margin-left: 0;
    padding: 0;
  }
  .timeline-setlist .setlist-list {
    gap: 5px;
  }
  .timeline-setlist .setlist-item {
    grid-template-columns: 26px minmax(0, max-content) auto minmax(0, 1fr);
    gap: 5px;
    font-size: 11.5px;
  }
  .timeline-setlist .setlist-title,
  .timeline-setlist .setlist-artist {
    overflow-wrap: anywhere;
  }
  .chart-wrap {
    height: 230px;
  }
  .chart-wrap.short {
    height: 180px;
  }
  .chart-wrap.tall {
    height: 280px;
  }
  .activity-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .activity-row .a-title {
    white-space: normal;
  }
  .bar-list .bar-row {
    grid-template-columns: 24px 1fr 44px;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .song-row {
    grid-template-columns: 28px minmax(0, 1fr) minmax(98px, auto);
    gap: 2px 6px;
    padding: 8px 10px;
  }
  .song-row .rank {
    font-size: 13px;
  }
  .song-row .title {
    font-size: 13px;
  }
  .song-row-side {
    min-width: 98px;
  }
  .song-meta-line,
  .song-key-line {
    gap: 4px;
  }
  .genre-badge,
  .tag-badge,
  .match-badge,
  .song-key-badge {
    font-size: 10.5px;
    padding-left: 7px;
    padding-right: 7px;
  }
  .song-row .last {
    font-size: 10px;
  }
}

/* === Charts === */

.chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}
.chart-wrap.short { height: 200px; }
.chart-wrap.tall { height: 360px; }
.chart-wrap canvas {
  max-width: 100% !important;
  height: 100% !important;
}

/* === Analytics tags === */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: var(--ink-soft);
  transition: all 0.1s ease;
}
.tag.clickable {
  cursor: pointer;
  user-select: none;
}
.tag.clickable:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-strong);
}
.tag .tag-num {
  display: inline-block;
  margin-left: 6px;
  background: var(--primary-strong);
  color: #fff;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 700;
}

/* Recent activity list */
.activity-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
}
.activity-row:last-child { border-bottom: none; }
.activity-row .a-date {
  font-weight: 700;
  color: var(--primary-strong);
  font-feature-settings: var(--tnum);
}
.activity-row .a-title {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-row .a-meta { color: var(--ink-mute); font-size: 11px; }
.activity-row a { color: var(--ink); }

/* Top-list with bars */
.bar-list .bar-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  cursor: default;
}
.bar-list .bar-row.clickable { cursor: pointer; }
.bar-list .bar-row.clickable:hover .bar-bar { filter: brightness(1.1); }
.bar-list .bar-rank {
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
  font-feature-settings: var(--tnum);
}
.bar-list .bar-content {
  min-width: 0;
}
.bar-list .bar-label {
  font-size: 12.5px;
  color: var(--ink);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-list .bar-bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  transition: filter 0.12s ease;
}
.bar-list .bar-bar.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}
.bar-list .bar-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-strong);
  font-feature-settings: var(--tnum);
}

/* === Today's Song (今日の一曲) === */

.todays-song-box {
  margin: 8px 0 12px;
}

.todays-song-card {
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.todays-song-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.todays-song-label {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.todays-song-dismiss {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-mute);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.todays-song-dismiss:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.todays-song-info {
  margin-bottom: 12px;
}

.todays-song-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
}

.todays-song-artist {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
  word-break: break-word;
}

.todays-song-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.todays-song-count,
.todays-song-last,
.todays-song-key {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.todays-song-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

@media (max-width: 600px) {
  .todays-song-card {
    padding: 12px;
  }

  .todays-song-title {
    font-size: 15px;
  }

  .todays-song-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .todays-song-actions .btn {
    justify-content: center;
  }
}

/* ── ダッシュボード: 続きから見る ── */
.dashboard-resume-card { grid-column: 1 / -1; }

.dashboard-resume-card .card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-resume-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.dashboard-resume-clear {
  background: none;
  border: none;
  color: var(--ink-mute);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.dashboard-resume-clear:hover { color: var(--red); background: var(--surface-3); }
.dashboard-resume-queue:hover { color: var(--primary); background: var(--primary-soft); }

.dashboard-resume-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 230px);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.dashboard-resume-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  padding: 0 0 9px;
  text-align: left;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.dashboard-resume-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.dashboard-resume-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--surface-3);
}

.dashboard-resume-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  padding: 0 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-resume-meta {
  font-size: 10px;
  color: var(--ink-mute);
  padding: 0 9px;
}

/* ── ダッシュボード: まとめカード（リキャップ） ── */
.dashboard-recap-card {
  grid-column: 1 / -1;
}

.dashboard-recap-card .card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-recap-toggle {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}

.recap-period-label {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 10px;
}

.recap-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.recap-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-width: 80px;
  text-align: center;
  flex: 1 1 80px;
}

.recap-tile strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-strong);
  line-height: 1.1;
}

.recap-tile span {
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-top: 3px;
}

.recap-top-song {
  font-size: 13px;
  color: var(--ink);
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.recap-sub {
  color: var(--ink-mute);
  font-size: 11px;
}
