/* ===== 上のヘッダーと、下の3つのタブ（app/assets/stylesheets/tabs.css） ===== */
:root {
  --tab-height: 58px;
}

/* 下にタブとプレイヤーバーの2段があるので、その分だけページの下をあける */
body {
  padding-bottom: calc(var(--player-height) + var(--tab-height) + 24px);
}

.app-header {
  position: relative;
  z-index: 1; /* 曲の詳細のジャケットのぼかし（search.css）が上まで広がっても、ロゴと設定はその前に出す */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 960px; /* ページの中身（application.css の main）と左右をそろえる */
  height: 56px;
  margin: 0 auto;
  padding: 0 8px 0 16px;
}

.app-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.app-header h1 a {
  color: inherit;
  text-decoration: none;
}

.header-setting {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--text-secondary);
}

.header-setting:hover {
  background: var(--bg-raised);
  color: var(--text-primary);
}

.header-auth a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-left: 8px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.header-auth .header-signup {
  border-color: var(--fill-strong);
  background: var(--fill-strong);
  color: var(--text-inverse);
}

/* プレイヤーバーは、タブのすぐ上に出す */
.player-bar,
.full-player {
  bottom: var(--tab-height);
}

.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 102;
  height: var(--tab-height);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: env(safe-area-inset-bottom);
  font-family: var(--font);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.tab-item.is-on {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== 各タブの上の、今週の推しのあんない ===== */
.slot-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 12px 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-l);
  background: var(--bg-surface);
}

.slot-box p {
  margin: 0;
}

.slot-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--fill-strong);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.slot-button.is-small {
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.page-sub {
  margin: 0 0 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 「気分・ジャンルからさがす ›」のような、矢印つきの小さなリンク */
.page-sub a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  text-decoration: none;
}

.page-sub a::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--icon-chevron) center / contain no-repeat;
  mask: var(--icon-chevron) center / contain no-repeat;
}

.page-sub a:hover {
  color: var(--text-primary);
}

/* ===== 「くわしく」でたたんでおく欄 ===== */
.more-box {
  margin: 16px 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-l);
  padding: 0 16px;
  background: var(--bg-surface);
}

.more-box > summary {
  padding: 12px 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: bold;
}

.more-box[open] {
  padding-bottom: 12px;
}

.me-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0;
  font-size: 14px;
}

.share-big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 16px 0;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--fill-strong);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.settings-logout {
  margin-top: 24px;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}

.me-stats {
  margin: 8px 0 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.me-stats a {
  color: inherit;
  text-decoration: none;
}

.settings-links {
  max-width: 560px;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.settings-links li {
  border-bottom: 1px solid var(--border-subtle);
}

/* 設定のリンクの行（Figma の「リンクの行」：高さ 48px、右に ›） */
.settings-links li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 0 0 4px;
  color: var(--text-primary);
  font-size: 14px;
  text-decoration: none;
}

.settings-links li a::after {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: var(--text-tertiary);
  -webkit-mask: var(--icon-chevron) center / contain no-repeat;
  mask: var(--icon-chevron) center / contain no-repeat;
}

.settings-links li a:hover::after {
  background: var(--text-primary);
}

/* ===== プレイヤーバー：曲がないときは隠す ===== */
.player-bar:not(.has-track) {
  display: none;
}

html:not(.has-player) body {
  padding-bottom: calc(var(--tab-height) + 24px);
}

/* ===== スマホ：Figma の「ミニプレイヤー」（タブの上に浮かぶ、角の丸いカード） =====
   ・ジャケット・曲名・アーティスト・再生（白い丸）・次の曲だけ
   ・ジャケットを押すと、大きな再生画面が開く（パソコンと同じ。player.js）
   ・再生位置は、カードの下のふちの細い線 */
@media (max-width: 640px) {
  :root {
    --player-height: 66px; /* カードの高さ＋すきま（ページの下をこれだけあける） */
  }

  .player-bar {
    left: 8px;
    right: 8px;
    bottom: calc(var(--tab-height) + 8px);
    height: auto;
    padding: 8px 8px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "now buttons";
    column-gap: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-l);
  }

  .player-now {
    gap: 12px;
  }

  .player-artwork {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-s);
  }

  .player-title {
    font-size: 15px;
    font-weight: 500;
  }

  .player-artist {
    margin-top: 0;
  }

  /* 試聴のクレジット（.player-meta）は、スマホでも消さない。
     Apple の決まりで「provided courtesy of iTunes」を試聴の近くに出す必要があるため */
  .player-bar .player-side,
  .player-bar .player-detail,
  #player-prev {
    display: none;
  }

  .player-buttons {
    gap: 4px;
  }

  /* 再生位置：カードの下のふちに、細い線だけ（さわれない） */
  .player-bar .player-progress {
    grid-area: auto;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 5px;
    display: block;
    width: auto;
    max-width: none;
    height: 2px;
  }

  .player-bar .player-progress span {
    display: none;
  }

  .player-bar .player-progress input[type="range"] {
    display: block;
    width: 100%;
    height: 2px;
    pointer-events: none;
  }

  .player-bar .player-progress input[type="range"]::-webkit-slider-thumb {
    opacity: 0;
  }

  .player-bar .player-progress input[type="range"]::-moz-range-thumb {
    opacity: 0;
  }

  /* 音量はスマホ本体のボタンで変える */
  .player-bar .player-volume {
    display: none;
  }

}

/* ===== 曲の1行：ジャケット｜曲名・アーティスト｜▶︎・推す を、スマホでも1行に並べる ===== */
.post-row,
.search-results li {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.search-results li > .song-artwork {
  float: none;
  margin: 0;
}

.post-row .post-row-art,
.search-results li > .song-artwork {
  flex: none;
}

.post-row .result-text,
.search-results li .result-text {
  flex: 1 1 auto;
  min-width: 0;
}

.post-row .result-text p,
.search-results li .result-text p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 曲名（Figma の「曲名」15px）とアーティスト（「補足」12px） */
.result-title,
.result-title strong {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.post-row .result-meta,
.search-results li .result-meta {
  margin-top: 2px;
  font-size: 12px;
}

/* アーティストの横の「@ユーザーID」：下線なし、押せる */
.result-meta a {
  color: inherit;
  text-decoration: none;
}

.result-meta a:hover {
  color: var(--text-primary);
}

.post-row .result-actions,
.search-results li .result-actions {
  flex: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  margin: 0;
}

/* ===== 曲のまとまりのうしろに、代表の曲のジャケットの色をにじませる =====
   見つけるの「〇〇系の推しから」・みんなの推し・推した曲・曲をさがすの結果（app/helpers/match_helper.rb の section_glow）
   ・見出しのうしろ（左上）に、そのジャケットを大きくぼかしたもの。スクロールすると、まとまりごとに色が変わる
   ・色の濃さは opacity、にじむ大きさは width・height と blur() の数字で変えられる */
.glow-section {
  position: relative;
  isolation: isolate; /* にじみを、このまとまりの文字や曲の行より後ろに置く */
}

.glow-section > :not(.section-glow) {
  position: relative;
}

/* にじみの作り方（iPhone でも、ふちが四角く見えないように）
   1. 入れもの（.section-glow）＝ ぼかしをかける箱
   2. 中の まるい画像（.section-glow-art）
   3. その上に、外がわへ向かって ページの地の色（--bg-base）になっていく ふた（::after）
   4. 1〜3 をまとめてから ぼかす（filter は入れものに付けてある）
   こうすると、箱のふちのところの色は「ページの地の色そのもの」になるので、
   iPhone のようにぼかしを箱で切ってしまうブラウザでも、切れ目が見えない。
   （前は mask でふちを消していたが、iPhone の中のブラウザでは効かず、
     白っぽいジャケットのとき、四角いうすい板が画面に出てしまっていた） */
.section-glow {
  position: absolute;
  z-index: -1;
  top: -230px; /* まるい画像の場所は前と同じ。まわりのあき 150px の分だけ外へ */
  left: -230px;
  width: 620px;  /* まるい画像 320px ＋ まわりのあき 150px × 2 */
  height: 620px;
  /* 曲の詳細のまわりのぼかし（search.css の .song-hero-glow）と同じ光方 */
  filter: blur(60px) saturate(1.6);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

.section-glow-art {
  position: absolute;
  inset: 150px; /* まわりに 150px のあき */
  width: auto;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
}

/* 外がわを、ページの地の色にしていく ふた（ぼかす前にかぶせるので、ふちに切れ目が出ない） */
.section-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, rgba(10, 10, 11, 0) 55%, var(--bg-base) 92%);
}

/* スマホでは、にじみを出さない。
   スマホはぼかしの計算が重く、効くまでの数秒、ぼける前の「四角い板」がそのまま見えてしまう。
   その数秒はカクついて、ページ全体が安っぽく見えるので、小さい画面では最初から出さないことにした。
   （パソコンはすぐ効くので、そのまま出す） */
@media (max-width: 640px) {
  .section-glow {
    display: none;
  }
}

/* にじみの上の見出し・説明は、少し白めにして、うすい影をつける（白っぽいジャケットでも読めるように） */
.glow-section h2,
.glow-section .oshi-group-from,
.glow-section .search-count,
.glow-section .me-bookmarks {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.glow-section .oshi-group-from,
.glow-section .search-count,
.glow-section .me-bookmarks a {
  color: rgba(237, 237, 234, 0.8);
}

/* ===== あとで聴く（ブックマーク）のしおりボタン ===== */
.bookmark-button form {
  margin: 0;
}

.bookmark-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.bookmark-icon.is-on {
  color: var(--text-primary);
}

.bookmark-icon svg,
.oshi-button svg {
  width: 20px;
  height: 20px;
}

.bookmark-icon:hover,
.oshi-button:hover,
.mute-icon:hover,
.share-icon:hover {
  background: var(--bg-raised);
}

.me-bookmarks {
  margin: -2px 0 8px;
  font-size: 13px;
}

.me-bookmarks a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  text-decoration: none;
}

/* ===== 見つける：検索窓と、推しのグループごとのおすすめ ===== */
.find-search {
  display: flex;
  gap: 8px;
  margin: 12px 0 8px;
}

.find-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px 0 40px;
}

.find-search input[type="submit"] {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
}

.find-welcome {
  margin: 20px 0;
  padding: 16px;
  border-radius: var(--radius-l);
  background: var(--bg-surface);
}

.find-welcome p {
  margin: 0 0 6px;
}

.oshi-group h2 {
  margin: 28px 0 2px;
  font-size: 17px;
}

.oshi-group-from {
  margin: 0 0 4px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.find-more {
  margin: 16px 0;
  text-align: center;
}

/* ===== プロフィール：音楽タイプのカード（写真＋名前＋説明を横に1枚）=====
   わくと背景は、ほかのカードと同じ色。タイプの色（--type-color）は「TYPE ○○○○・…」の文字だけ */
.type-hero {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch; /* 写真の高さを、右の文字と同じにする（下があかないように） */
  margin: 12px 0 22px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-surface);
}

.type-hero-art {
  overflow: hidden;
  width: 120px;
  min-height: 150px; /* パソコンでは 120×150（4:5）。文字が長いときは、文字に合わせて縦にのびる */
  border-radius: 10px;
}

@media (max-width: 640px) {
  .type-hero {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }

  .type-hero-art {
    width: 96px;
    min-height: 120px;
  }
}

/* ===== 音楽タイプの写真（app/helpers/type_art_helper.rb）。写真を少し大きくして、タイプごとに小さく動かす ===== */
.type-art {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #111;
}

.type-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transform-origin: 50% 60%;
  animation: 6s ease-in-out infinite alternate tp-breathe;
}

.type-art[data-move="jump"] img { animation: 0.55s ease-in-out infinite alternate tp-jump; }
.type-art[data-move="hop"] img { animation: 0.8s ease-in-out infinite alternate tp-jump; }
.type-art[data-move="sway"] img { animation: 2.4s ease-in-out infinite alternate tp-sway; }
.type-art[data-move="sway-fast"] img { animation: 1s ease-in-out infinite alternate tp-sway; }
.type-art[data-move="sway-slow"] img { animation: 4s ease-in-out infinite alternate tp-sway; }
.type-art[data-move="bang"] img { animation: 0.5s ease-in-out infinite alternate tp-nod; }
.type-art[data-move="nod"] img { animation: 1.4s ease-in-out infinite alternate tp-nod; }
.type-art[data-move="walk"] img { animation: 1.2s ease-in-out infinite alternate tp-walk; }
.type-art[data-move="float"] img { animation: 3.4s ease-in-out infinite alternate tp-float; }
.type-art[data-move="float-slow"] img { animation: 6s ease-in-out infinite alternate tp-float; }
.type-art[data-move="glitch"] img { animation: 3s steps(1) infinite tp-glitch; }

@keyframes tp-breathe { from { transform: scale(1.06); } to { transform: scale(1.14); } }
@keyframes tp-jump { from { transform: scale(1.1) translateY(1.5%); } to { transform: scale(1.1) translateY(-2.5%); } }
@keyframes tp-sway { from { transform: scale(1.12) rotate(-1.6deg); } to { transform: scale(1.12) rotate(1.6deg); } }
@keyframes tp-nod { from { transform: scale(1.1) translateY(-1%); } to { transform: scale(1.1) translateY(1.5%); } }
@keyframes tp-walk { from { transform: scale(1.12) translateX(-2%); } to { transform: scale(1.12) translateX(2%); } }
@keyframes tp-float { from { transform: scale(1.1) translateY(1.5%); } to { transform: scale(1.1) translateY(-1.5%); } }
@keyframes tp-glitch {
  0%, 100% { transform: scale(1.08); filter: none; }
  46% { transform: scale(1.08) translateX(1.5%); filter: contrast(1.4) brightness(1.15); }
  48% { transform: scale(1.08); filter: none; }
  50% { transform: scale(1.08) translateX(-1%); filter: contrast(1.3); }
  52% { transform: scale(1.08); filter: none; }
}

.type-art.is-still img {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .type-art img {
    animation: none !important;
  }
}

.type-hero-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.type-hero-label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.type-hero-name {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.type-hero-code {
  margin: 0;
  color: var(--type-color);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.type-hero-desc {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.type-hero-genres {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.type-hero .music-type-all {
  margin: 4px 0 0;
  font-size: 12px;
}

/* 16タイプの一覧：それぞれのイラスト */
.type-cell-art {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 10px;
  border-radius: 10px;
}

/* ===== 音楽タイプの欄の右上の、小さな「シェア」ボタン ===== */
.music-type-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.music-type-head .music-type-label {
  margin: 0;
}

.share-small {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: none;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.share-small:hover {
  border-color: var(--text-tertiary);
}

/* ===== 推すボタン（ハート1つ）。♡ を押すと推す・♥ を押すと外す ===== */
.post-song form {
  margin: 0;
}

.oshi-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.oshi-button.is-on {
  color: var(--accent);
}

.result-actions > form {
  margin: 0;
}

/* ===== プレイヤーの「この曲の詳細」 ===== */
.player-now {
  min-width: 0;
}

.player-detail {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--player-subtext);
  cursor: pointer;
}

.player-detail:hover {
  color: var(--player-text);
}

/* ===== 音楽タイプの欄（小さめ） ===== */
.music-type {
  max-width: 520px;
  margin: 12px 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-l);
  background: var(--bg-surface);
}

.music-type p {
  margin: 0 0 6px;
}

.music-type-label {
  color: var(--text-secondary);
  font-size: 12px;
}

.music-type-name {
  margin-top: 6px;
  font-size: 22px;
  font-weight: bold;
}

.music-type-words,
.music-type-desc,
.music-type-all {
  font-size: 13px;
}

.music-type-all a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 14px;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
}

.music-type-code {
  margin-left: 4px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  vertical-align: 3px;
}

.music-type-desc {
  color: var(--text-secondary);
}

/* 「くわしく ›」「16タイプを見る ›」「あとで聴く（3曲） ›」：矢印つきの小さなリンク */
.music-type-all a::after,
.me-bookmarks a::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--icon-chevron) center / contain no-repeat;
  mask: var(--icon-chevron) center / contain no-repeat;
}

.music-type-all a:hover,
.me-bookmarks a:hover {
  color: var(--text-primary);
}

/* ===== Spotify のプレーヤーの右の「詳細」「Apple Music」「閉じる」：はみ出さないように ===== */
.full-player-head {
  max-width: 320px;
  min-width: 0;
}

.full-player-buttons {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .full-player-head {
    min-width: 0;
  }

  .full-player-head {
    justify-content: flex-end;
  }

  .full-player-head button {
    padding: 4px 10px;
  }

  /* ボタンは1列のまま。お知らせの文字があるときは、ボタンの上の1行に出す */
  .full-player-head {
    flex-wrap: wrap;
  }

  .full-player-buttons {
    flex: none;
    flex-wrap: nowrap;
    margin-left: auto;
  }

  #full-player-note {
    flex: 1 1 100%;
    min-width: 0;
  }

  #full-player-note:empty {
    display: none;
  }
}

/* 「詳細」（ⓘ）と「閉じる」（×）は、プレイヤーバーのⓘと同じ、枠のないアイコン */
.full-player-head .full-player-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  color: var(--player-subtext);
}

.full-player-head .full-player-icon:hover {
  color: var(--player-text);
}

.full-player-head .full-player-icon[hidden] {
  display: none; /* ↻（Apple Music のときだけ出す） */
}

.full-player-buttons {
  align-items: center;
}

/* ===== 推しの詳細：あとで聴く・♥・再生を横1列に ===== */
.tweet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.tweet-actions form {
  margin: 0;
}

/* ===== 自分の推しの ♥ の数（押すと、誰がくれたかが出る） ===== */
.heart-who {
  position: relative;
}

.heart-who > summary {
  list-style: none;
  cursor: pointer;
}

.heart-who > summary::-webkit-details-marker {
  display: none;
}

.heart-who-list {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 20;
  min-width: 140px;
  margin: 4px 0 0;
  padding: 6px 10px;
  list-style: none;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-m);
  background: var(--bg-raised);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 13px;
}

.heart-who-list li {
  padding: 3px 0;
  white-space: nowrap;
}

.heart-who-line {
  font-size: 14px;
}

/* ===== ほかの人のプロフィール：フォローは1行に小さく ===== */
.follow-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.follow-line form {
  margin: 0;
}

.follow-line .follow-button {
  padding: 3px 12px;
  border-width: 1px;
  font-size: 13px;
}

.follow-note {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ===== 音楽の相性：枠や絵は出さず、文字だけ ===== */
.match-card.match-simple {
  margin: 0 0 16px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
}

.match-simple p {
  margin: 0 0 4px;
  font-size: 14px;
}

.match-simple .match-note {
  color: var(--text-secondary);
  font-size: 13px;
}

.match-picks-title {
  margin: 12px 0 0;
  font-size: 15px;
}

/* ===== 曲の詳細の小さな ⊘（このアーティストを好みが近い人の推しに出さない） ===== */
.mute-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.mute-icon:hover {
  color: var(--text-primary);
}

.mute-icon.is-on {
  color: var(--danger);
}

/* 設定の「出さないアーティスト」は、ふつうのリンクの並びと同じくらい小さく */
.muted-list {
  margin: 4px 0 16px;
  padding-left: 1.2em;
  font-size: 14px;
}

.muted-list li {
  padding: 2px 0;
}

.inline-form {
  display: inline;
  margin: 0;
}

.mute-undo {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-default);
  text-underline-offset: 3px;
  cursor: pointer;
}

.settings-subhead {
  margin: 24px 0 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: normal;
}

/* ===== 登録しないで試す（/try） ===== */
.try-intro {
  margin: 16px 0 8px;
}

.try-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: bold;
}

.try-picked {
  margin: 8px 0 4px;
  padding-left: 1.4em;
  font-size: 14px;
}

.try-pick {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-strong);
  color: var(--text-inverse);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.try-result {
  margin: 16px 0;
}

.try-lead {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.try-signup {
  margin: 20px 0 8px;
  padding: 16px;
  border-radius: var(--radius-l);
  background: var(--bg-surface);
}

.try-signup p {
  margin: 0 0 6px;
}

.try-login {
  margin-left: 12px;
  font-size: 14px;
}

.try-again,
.try-links {
  font-size: 13px;
}

.try-ready {
  margin: 8px 0 12px;
}

.try-ready .try-more {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ジャンルでしぼるところ（/try。検索の窓の下。中身は「見つける」の検索と同じ部品） */
.try-genre-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 18px;
}

/* さがす前の候補の見出し（「よく知られた曲」など） */
.try-list-title {
  margin: 14px 0 4px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: bold;
}

.try-share-note {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 結果の上の「〇〇との相性」 */
.try-match {
  margin-bottom: 20px;
}

/* シェアされたリンクを開いたとき（/with/コード・/invite/ユーザーID） */
.partner-intro {
  margin: 16px 0;
}

/* シェアを開いた人に、いちばんにやってほしいこと。
   一目で分かるように、ひとまとまりの大きな案内にしてある */
.partner-cta {
  max-width: 460px;
  margin: 28px 0 8px;
  padding: 24px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-l);
  background: var(--bg-surface);
}

.partner-intro .try-title {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.25;
}

.partner-action {
  margin: 0;
}

.partner-action .slot-button {
  box-sizing: border-box; /* 横はばいっぱいにしても、カードからはみ出さない */
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  font-size: 17px;
  text-align: center;
}

.partner-cta .page-sub {
  margin: 12px 0 0;
  font-size: 14px;
}

/* ===== 辞書に足す曲（管理する人だけ） ===== */
.request-help {
  font-size: 0.85em;
  color: var(--text-secondary);
}

.request-list {
  padding-left: 1.6em;
}

.request-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.request-count,
.request-actions {
  font-size: 0.85em;
  color: var(--text-secondary);
  margin-left: 6px;
}

.request-top strong::before {
  content: "★ ";
}

.request-skipped {
  margin-top: 20px;
  font-size: 0.9em;
}

/* 曲・推しのページの小さい「シェア」のマーク（⊘ と同じ大きさ・同じ灰色） */
.share-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.share-icon:hover {
  color: var(--text-primary);
}

/* 見つける：グループごとの曲は、パソコン用に多め（12曲）に届く。スマホ・タブレットは前の5曲だけ */
@media (max-width: 1023px) {
  .oshi-group .search-results > li:nth-child(n + 6) {
    display: none;
  }
}

/* ===== パソコン（横はばが 1024px 以上）：左にナビ =====
   スマホは今までどおり、画面の下の3つのタブ。パソコンでは同じタブ（layouts/_tab_bar）を、左に縦に並べる
   ・いちばん上にロゴ、いちばん下に「設定」（ログインしていない人は「ログイン」）
   ・上のロゴの帯（.app-header）は出さない（ロゴと設定は左のナビにある）
   ・中身は右側のまん中に、読みやすい幅で
   ・下のプレイヤーは、左のナビの右から */
.side-logo,
.side-bottom {
  display: none;
}

@media (min-width: 1024px) {
  :root {
    --side-width: 232px;
  }

  body {
    padding-left: var(--side-width);
    padding-bottom: calc(var(--player-height) + 32px);
  }

  html:not(.has-player) body {
    padding-bottom: 48px;
  }

  .app-header {
    display: none;
  }

  main {
    max-width: 820px;
    padding: 24px 40px 0;
  }

  .tab-bar {
    top: 0;
    right: auto;
    bottom: 0;
    width: var(--side-width);
    height: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 12px 20px;
    border-top: 0;
    border-right: 1px solid var(--border-subtle);
  }

  .side-logo {
    display: block;
    margin: 0 10px 22px;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-decoration: none;
  }

  .tab-bar .tab-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 10px 12px;
    border-radius: var(--radius-m);
    font-size: 15px;
    letter-spacing: 0;
  }

  .tab-bar .tab-item:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
  }

  .tab-bar .tab-item.is-on {
    background: var(--bg-raised);
  }

  .side-bottom {
    display: flex;
    flex-direction: column;
    margin-top: auto; /* いちばん下に置く */
  }

  .side-login {
    align-self: flex-start;
    margin: 0 10px;
  }

  /* 下のプレイヤー・Spotify のプレーヤーは、左のナビの右から（下にタブはないので、いちばん下に） */
  .player-bar,
  .full-player {
    left: var(--side-width);
    bottom: 0;
  }

  /* 曲の一覧：横に2〜3列にならべる（画面が広いほど列がふえる。1列が横に長くなりすぎないように） */
  main {
    max-width: 1240px;
  }

  .search-results,
  .post-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    column-gap: 32px;
    align-items: start;
  }

  /* 「もっと見る」で足す分（枠）は、中の曲だけを同じ列にならべる */
  .post-rows .page-frame {
    display: contents;
  }

  .post-rows .more-row {
    grid-column: 1 / -1;
  }

  /* 曲の一覧のまとまりは、画面の幅いっぱいまで使う（右があかないように） */
  .post-rows,
  .friend-picks,
  .song-search,
  .similar-songs {
    max-width: none;
  }

  /* 検索窓・見出しなどは、読みやすい幅のまま */
  .find-search,
  .search-main,
  .settings-form,
  .settings-links,
  .music-type {
    max-width: 640px;
  }

  .type-hero {
    max-width: 640px;
  }
}

/* ===== 右のパネル：この曲が流れているわけ（流している曲があるときだけ）
   推し → いまの曲 → 次の曲 と、この曲の説明
   ・パソコンの大きな画面（1280px 以上）：いつも右に出しておく
   ・それより小さい画面：右のはしの「流れているわけ」のつまみから、右からすべって出てくる（player.js）=====
   .now-panel-scroll の中だけが動く（つまみは外に出す） */
.now-panel {
  position: fixed;
  top: 0;
  right: 0;
  box-sizing: border-box;
  background: var(--bg-base);
}

.now-panel[hidden] {
  display: none;
}

.now-panel-scroll {
  box-sizing: border-box;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.now-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 18px;
}

/* 見出し（左の動くしるしはなし） */
.now-panel-kicker {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.now-panel-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.now-panel-close:hover {
  color: var(--text-primary);
}

@media (min-width: 1280px) {
  html.has-now-panel body {
    padding-right: 340px;
  }

  .now-panel {
    bottom: var(--player-height);
    z-index: 2;
    width: 340px;
    border-left: 1px solid var(--border-subtle);
  }

  .now-panel-scroll {
    padding: 36px 28px 24px;
  }

  .now-panel-handle,
  .now-panel-close,
  .now-panel-shade,
  .np-why {
    display: none;
  }
}

/* 小さい画面：右からすべって出てくる引き出し */
@media (max-width: 1279.98px) {
  .now-panel {
    bottom: 0;
    z-index: 310; /* 大きな再生画面（300）からも開けるように、その上 */
    width: min(360px, 88vw);
    border-left: 1px solid var(--border-default);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    touch-action: pan-y; /* たてはページのように動かす。よこになぞると閉じる（player.js） */
  }

  html.now-panel-open .now-panel {
    transform: translateX(0);
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.5);
  }

  .now-panel-scroll {
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
  }

  /* つまみ：閉じているとき、画面の右のはしに少しだけ出ている（引き出しの左に付いている） */
  .now-panel-handle {
    position: absolute;
    right: 100%;
    bottom: calc(var(--player-height) + 20px);
    display: block;
    padding: 12px 6px;
    border: 1px solid var(--border-default);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: var(--bg-raised);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    writing-mode: vertical-rl;
    cursor: pointer;
    touch-action: none; /* 左へなぞって開く（player.js） */
    transition: opacity 0.2s;
  }

  .now-panel-handle:hover {
    color: var(--text-primary);
  }

  html.now-panel-open .now-panel-handle,
  html.now-playing-open:not(.now-panel-open) .now-panel-handle {
    opacity: 0;
    pointer-events: none;
  }

  /* うしろの暗いところ（押すと閉じる） */
  .now-panel-shade {
    position: fixed;
    inset: 0;
    z-index: 305;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s;
  }

  html.now-panel-open .now-panel-shade {
    opacity: 1;
    pointer-events: auto;
  }

  /* 大きな再生画面の「この曲が流れているわけ」 */
  .np-why {
    align-self: center;
    padding: 4px 12px;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }
}

/* 引き出しのいちばん下の「前の曲・再生／一時停止・次の曲」
   引き出しになっている画面（1280px より せまい。スマホ・タブレット・パソコンの細い窓）で出す。
   引き出しを開いているあいだは、うしろが暗くなって下のプレーヤーが押せないので、ここに同じボタンを置く */
.now-panel-controls {
  display: none;
}

@media (max-width: 1279.98px) {
  /* 上（流れているわけ）だけが動いて、ボタンの列はいつも下に見えている */
  .now-panel {
    display: flex;
    flex-direction: column;
  }

  .now-panel-scroll {
    flex: 1;
    min-height: 0;
    height: auto;
    padding-bottom: 16px;
  }

  .now-panel-controls {
    flex: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 10px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-subtle);
  }

  .now-panel-controls button {
    display: grid;
    place-items: center;
    padding: 4px;
    border: 0;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
  }

  .now-panel-controls button:disabled {
    opacity: 0.3;
    cursor: default;
  }

  .now-panel-controls button[hidden] {
    display: none;
  }

  /* まん中の 再生／一時停止：下のプレーヤーと同じ、白い丸 */
  .now-panel-controls #now-panel-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: var(--fill-strong);
    color: var(--text-inverse);
  }

  .now-panel-controls.is-playing .player-icon-play {
    display: none;
  }

  .now-panel-controls.is-playing .player-icon-pause {
    display: block;
  }
}

/* タブの下のバーがある画面（1024px より小さい）：つまみは、タブとプレイヤーの上に */
@media (max-width: 1023px) {
  .now-panel-handle {
    bottom: calc(var(--tab-height) + var(--player-height) + 20px);
  }
}

/* つながり：左に縦の線、曲ごとに点 */
.why-chain {
  position: relative;
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
}

.why-chain::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--border-default);
}

.why-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.why-dot {
  position: absolute;
  top: 50%;
  left: -18px;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border: 2px solid var(--bg-base);
  border-radius: 50%;
  background: var(--text-tertiary);
}

.why-dot.is-now {
  top: 30px;
  margin-top: 0;
  background: var(--text-primary);
  box-shadow: 0 0 0 4px rgba(237, 237, 234, 0.12);
}

.why-step-next {
  opacity: 0.8;
}

/* ジャケット */
.why-art {
  display: block;
  flex: none;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-raised);
}

.why-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-art-s {
  width: 40px;
  height: 40px;
}

.why-art-l {
  width: 64px;
  height: 64px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

/* 曲名・アーティスト */
.why-song-text {
  min-width: 0;
}

.why-song-label {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.why-song-title {
  display: block;
  overflow: hidden;
  margin: 1px 0 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}

a.why-song-title:hover {
  text-decoration: underline;
}

.why-song-title.is-big {
  font-size: 16px;
  font-weight: 700;
}

.why-song-artist {
  overflow: hidden;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 近いところ（線の上に、小さな丸いしるし） */
.why-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-height: 14px;
  padding: 10px 0;
}

.why-link-label {
  color: var(--text-tertiary);
  font-size: 10px;
}

.why-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.why-chip {
  padding: 2px 8px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.5;
}

/* いまの曲：少し明るい箱（色はサイトの白・灰色だけ） */
.why-step-now {
  display: block;
  margin-left: -6px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
}

.why-step-now .why-dot.is-now {
  left: -13px;
}

.why-now-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.why-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.65;
}

.why-now-tags {
  margin-top: 10px;
}

.why-now-tags .why-chip {
  border-color: var(--border-default);
  color: var(--text-secondary);
}

/* 5つの軸（小さな5つの点） */
.why-axes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin-top: 12px;
}

.why-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.why-axis-name {
  color: var(--text-secondary);
  font-size: 11px;
}

.why-axis-bar {
  display: flex;
  gap: 3px;
}

.why-axis-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-default);
}

.why-axis-bar i.is-on {
  background: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .now-panel,
  .now-panel-shade {
    transition: none;
  }
}

/* ===== 広いパソコン（横はばが 1280px 以上）：曲の詳細・推しの詳細は2列 =====
   左：ジャケット・曲名・感性 / 右：この曲に近い曲（右があかないように） */
@media (min-width: 1280px) {
  .song-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    column-gap: 56px;
    align-items: start;
    max-width: none;
  }

  .song-detail > * {
    grid-column: 1;
  }

  .song-detail > .similar-songs {
    grid-column: 2;
    grid-row: 1 / span 8;
    max-width: none;
    margin-top: 0;
  }

  .song-detail .similar-songs h4 {
    margin-top: 8px;
  }

  .song-detail .similar-songs .search-results {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== プロフィール：Tune Meで出会った推し曲（ジャケットのカードを横に並べる）===== */
.found-songs {
  margin: 8px 0 32px;
}

.found-summary,
.found-empty {
  margin: 4px 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.found-summary strong {
  color: var(--text-primary);
  font-weight: 700;
}

.found-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  gap: 14px;
  margin: 0;
  padding: 0 0 8px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x proximity;
}

.found-grid li {
  scroll-snap-align: start;
}

.found-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.found-art {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin-bottom: 6px;
  border-radius: var(--radius-m);
  object-fit: cover;
  background: var(--bg-raised);
  color: var(--text-tertiary);
  font-size: 28px;
}

.found-card:hover .found-art {
  opacity: 0.85;
}

.found-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.found-artist,
.found-meta {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.found-meta {
  color: var(--text-tertiary);
  font-size: 11px;
}

@media (min-width: 1024px) {
  .found-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    overflow: visible;
  }

  .found-art {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
}

/* ===== みんな：おすすめ / フォロー中 の切りかえ（小さな丸いボタン2つ）===== */
.feed-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 20px;
}

.feed-tab {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.feed-tab:hover {
  color: var(--text-primary);
}

.feed-tab.is-current {
  border-color: var(--fill-strong);
  background: var(--fill-strong);
  color: var(--text-inverse);
}

.feed-empty {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== 曲の行のジャケット：60px（見やすい大きさ。行の高さはそのまま近く） ===== */
.search-results li > .song-artwork,
.post-row .post-row-art {
  width: 60px;
  height: 60px;
}

/* ===== 見つける：気分で選ぶ（小さな丸いボタンを横に。スマホは横にすべらせる）===== */
.mood-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 22px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mood-chips::-webkit-scrollbar {
  display: none;
}

.mood-chips-label {
  flex: none;
  margin-right: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.mood-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.mood-chip:hover {
  background: var(--bg-raised);
}

.mood-chip.is-on {
  border-color: var(--fill-strong);
  background: var(--fill-strong);
  color: var(--text-inverse);
}

.mood-chip-more {
  border-style: dashed;
  color: var(--text-secondary);
}

/* ===== 見つける：別の曲にする（矢印の絵＋文字の丸いボタン）===== */
.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.refresh-button:hover {
  background: var(--bg-raised);
}

.refresh-button:active svg {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

/* ===== 見つける：いちおし（大きなジャケットのカード）=====
   スマホ：横にすべらせる / パソコン：4つ並べる */
.featured-picks {
  margin-bottom: 28px;
}

.featured-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.featured-head h2 {
  margin: 0;
}

.featured-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 112px; /* スマホ：3つと少し見える（横にすべらせられるとわかるように） */
  gap: 12px;
  margin: 0;
  padding: 0 0 6px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
}

.featured-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  scroll-snap-align: start;
}

.featured-art {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.featured-art .song-artwork {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 0;
  transition: transform 0.4s ease;
}

.featured-art:hover .song-artwork {
  transform: scale(1.03);
}

.featured-text {
  min-width: 0;
}

.featured-title {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.featured-artist {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (min-width: 1024px) {
  .featured-list {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 140px);
    overflow: visible;
  }
}

/* ===== 広告から来た人の入口（/start）===== */
.start-page {
  max-width: 560px;
  padding-top: 8px;
}

.start-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
}

.start-lead {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.start-cta {
  margin: 28px 0 0;
  padding: 24px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-l);
  background: var(--bg-surface);
}

.start-cta .slot-button {
  box-sizing: border-box;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  font-size: 17px;
}

.start-cta .page-sub {
  margin: 12px 0 0;
  font-size: 14px;
}

.start-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.start-points li {
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.start-points strong {
  color: var(--text-primary);
}

/* ===== 管理する人だけの道具箱（広告のアドレス・今の数字）===== */
.admin-tools {
  max-width: 640px;
  margin: 0 0 28px;
  padding: 16px 16px 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-l);
  background: var(--bg-surface);
}

.admin-tools .ads-box {
  margin-bottom: 16px;
}

.admin-tools .section-title {
  margin-top: 0;
}

.admin-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 14px 0 12px;
  border-top: 1px solid var(--border-subtle);
}

.admin-numbers dt {
  color: var(--text-secondary);
  font-size: 12px;
}

.admin-numbers dd {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: bold;
}

.admin-numbers small {
  margin-left: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: normal;
}

/* ===== 広告に貼るアドレス（管理する人だけ）===== */
.ads-box {
  max-width: 640px;
  margin-bottom: 32px;
}

.ads-url {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-m);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
}

.ads-note {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

/* ===== 人気曲ランキング（管理する人だけ）===== */
.ranking-share {
  max-width: 640px;
  margin-bottom: 28px;
}

.ranking-text {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-m);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.ranking-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.ranking-no {
  flex: none;
  width: 28px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.ranking-text-col {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.ranking-text-col strong a {
  color: inherit;
}

.ranking-people {
  flex: none;
  color: var(--text-secondary);
  font-size: 13px;
}

.ranking-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.ranking-type {
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

.ranking-type-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.ranking-type-art {
  display: block;
  overflow: hidden;
  width: 48px;
  height: 60px;
  border-radius: 6px;
}
