/* 曲をさがすページの見た目（app/assets/stylesheets/search.css） */
/* 色（もとは この中で決めていた。今は application.css の色の変数を使う） */
:root {
  --search-accent: var(--fill-strong);
  --search-border: var(--border-subtle);
  --search-muted: var(--text-secondary);
  --search-soft: var(--bg-raised);
}

.song-search {
  max-width: 720px;
}

.search-lead,
.search-count {
  color: var(--search-muted);
}

.search-label {
  margin: 16px 0 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: normal;
}

/* 気分のボタン */
.mood-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mood-button:hover {
  color: var(--text-primary);
}

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

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

/* 条件の欄 */
.search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 10px 0;
}

.search-row select {
  max-width: 100%;
}

.axis-table {
  border-collapse: collapse;
}

.axis-table th,
.axis-table td {
  padding: 4px 8px 4px 0;
  border-bottom: 1px solid var(--search-border);
  text-align: left;
  vertical-align: middle;
}

.axis-table th small {
  display: block;
  font-weight: normal;
  color: var(--search-muted);
}

.search-submit {
  min-height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-strong);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* 結果 */
.search-like {
  padding: 10px 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-m);
}

.search-results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-results li {
  padding: 10px 0;
  border-bottom: 1px solid var(--search-border);
}

.search-results li > * {
  vertical-align: middle;
}

.result-text p {
  margin: 0;
}

.result-meta {
  font-size: 0.9em;
  color: var(--search-muted);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

/* 7要素の小さな棒グラフ */
.axis-bars {
  display: inline-grid;
  grid-template-columns: repeat(7, 16px);
  gap: 3px;
  margin-top: 6px;
}

.axis-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.axis-bar-fill {
  display: block;
  width: 10px;
  background: var(--search-accent);
  border-radius: 2px 2px 0 0;
  /* 高さは helper で 1〜5 → 6〜30px */
}

.axis-bar {
  height: 44px;
  justify-content: flex-end;
}

.axis-bar-name {
  font-size: 10px;
  line-height: 14px;
  color: var(--search-muted);
}

.search-pages {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ジャンルからえらぶ */
/* ジャンルからえらぶ：左に大きなジャンル、右にその中の細かいジャンル */
.genre-directory {
  display: grid;
  grid-template-columns: minmax(9em, 1fr) 2.2fr;
  gap: 12px;
  align-items: start;
}

.genre-groups {
  list-style: none;
  margin: 0;
  padding: 0;
  border-right: 1px solid var(--search-border);
}

.genre-group-button {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.genre-group-button small {
  color: var(--search-muted);
}

.genre-group-button:hover,
.genre-group-button.is-active {
  background: var(--search-soft);
}

.genre-group-button.is-active {
  font-weight: bold;
  box-shadow: inset -3px 0 0 var(--search-accent);
}

/* 右側は、左の欄の高さに合わせて上に貼りつく（スクロールしても見える） */
.genre-panels {
  position: sticky;
  top: 12px;
}

/* JavaScript が動いているときは、えらんだ大きなジャンルの中身だけを出す */
.genre-panel {
  margin-bottom: 12px;
}

.genre-directory.is-ready .genre-panel {
  display: none;
  margin: 0;
}

.genre-directory.is-ready .genre-panel.is-active {
  display: block;
}

.genre-panel-name {
  font-weight: bold;
  margin: 4px 0 8px;
}

.genre-chip-all {
  border-color: var(--fill-strong);
  color: var(--text-primary);
  font-weight: 600;
}

.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.genre-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
}

.genre-chip small {
  color: var(--search-muted);
}

.genre-chip:hover {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

/* 検索結果へ飛んだとき、ページの上に少しすき間をあける */
.search-results-top {
  scroll-margin-top: 12px;
}

/* 気分のボタンを外す「×」 */
.mood-off {
  margin-left: 6px;
  font-weight: bold;
  color: inherit;
}

/* 「細かくさがす」（ジャンル・雰囲気・5つの要素。ふだんは閉じておく） */
.search-details {
  margin: 12px 0;
}

.search-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-m);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  list-style: none;
  cursor: pointer;
}

.search-details summary::-webkit-details-marker {
  display: none;
}

.search-details summary::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;
  transition: transform 0.2s;
}

.search-details[open] > summary {
  margin-bottom: 12px;
}

.search-details[open] > summary::after {
  transform: rotate(90deg);
}

/* いつも見せる検索窓（横にさがすボタン） */
.search-main {
  flex-wrap: nowrap;
}

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

.axis-chosen {
  display: block;
  font-weight: normal;
  color: var(--search-accent);
  margin-left: 1.1em;
}

.search-like .axis-bars {
  display: grid;
}

/* ===== 曲名・アーティスト名の欄 ===== */
.search-word {
  flex: 1 1 280px;
}

.search-word input {
  width: 100%;
  max-width: 420px;
}

/* ===== ジャンルをえらぶ欄（右に飛び出すメニュー） ===== */
.search-genre {
  display: flex;
  align-items: center;
  gap: 8px;
}

.genre-picker {
  position: relative;
  display: inline-block;
}

.genre-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 11em;
  padding: 8px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-m);
  background: var(--bg-input);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.genre-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  width: 12.5em;
  padding: 4px 0;
  background: var(--bg-raised);
  border: 1px solid var(--search-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.genre-picker-menu[hidden] {
  display: none;
}

.genre-picker-groups {
  margin: 0;
  padding: 0;
  list-style: none;
}

.genre-picker-group {
  position: relative;
}

.genre-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.genre-picker-item small {
  color: var(--search-muted);
}

.genre-picker-item:hover,
.genre-picker-group.is-open > .genre-picker-parent {
  background: var(--search-soft);
}

.genre-picker-item.is-selected {
  font-weight: bold;
  color: var(--search-accent);
}

.genre-picker-more {
  color: var(--search-muted);
}

/* 右に飛び出す、細かいジャンルの欄 */
.genre-picker-flyout {
  display: none;
  position: absolute;
  top: -5px;
  left: 100%;
  width: 13em;
  max-height: 70vh;
  overflow-y: auto;
  padding: 4px 0;
  background: var(--bg-raised);
  border: 1px solid var(--search-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.genre-picker-group.is-open > .genre-picker-flyout {
  display: block;
}

.genre-picker-all {
  border-bottom: 1px solid var(--search-border);
}

/* スマホでは、飛び出す欄を少しせまくして、画面からはみ出さないようにする */
@media (max-width: 480px) {
  .search-genre {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .genre-picker-menu {
    width: 9.5em;
  }

  .genre-picker-flyout {
    width: min(13em, calc(100vw - 9.5em - 40px));
  }
}

/* ===== 設定画面 ===== */
.settings-form {
  max-width: 560px;
}

.settings-group {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.settings-group legend {
  float: left; /* 見出しをカードの外（上）に出す */
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: normal;
}

.settings-choice {
  clear: both;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

label.settings-choice:first-of-type {
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}

label.settings-choice:last-of-type {
  border-bottom: 0;
  border-radius: 0 0 var(--radius-l) var(--radius-l);
}

label.settings-choice:only-of-type {
  border-radius: var(--radius-l);
}

.settings-choice input {
  margin-top: 1px;
}

.settings-choice strong {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.settings-choice span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-form + .settings-note {
  max-width: 560px;
  margin-top: 12px;
}

.settings-choice small,
.settings-note {
  color: var(--text-secondary);
  font-size: 12px;
}

.settings-save {
  min-height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-strong);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== 音楽サービスにログイン（/setting/services）===== */
.services-back {
  margin: 0 0 4px;
}

.services-back a {
  color: var(--text-secondary);
  text-decoration: none;
}

.services-lead {
  max-width: 560px;
  line-height: 1.7;
}

.service-login {
  max-width: 560px;
  margin: 22px 0;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-surface);
}

.service-login h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.service-steps {
  margin: 0 0 12px;
  padding-left: 1.4em;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.service-steps code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-raised);
  color: var(--text-primary);
  font-size: 12px;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 12px;
}

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

.service-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.service-player iframe {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}

.service-player-spotify iframe {
  height: 80px;
  border-radius: 12px;
}

/* Apple のプレーヤーは高さ175px より低くできないので、画面の下のプレーヤーと同じように、広げてから小さくする */
.service-player-apple {
  --apple-scale: 0.72;
  overflow: hidden;
  height: calc(175px * var(--apple-scale) - 2px);
  border-radius: 12px;
}

.service-player-apple iframe {
  width: calc(100% / var(--apple-scale));
  height: 175px;
  transform: scale(var(--apple-scale));
  transform-origin: 0 0;
}

@media (max-width: 640px) {
  .service-player-apple {
    --apple-scale: 0.78;
  }
}

.service-help .settings-note {
  margin: 0 0 10px;
  line-height: 1.7;
}

/* ===== ログイン中の端末（/login_sessions）===== */
.device-list {
  max-width: 560px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.device-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.device-main {
  min-width: 0;
}

.device-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.device-badge {
  padding: 1px 8px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.device-meta {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.device-logout summary {
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  list-style: none;
}

.device-logout summary::-webkit-details-marker {
  display: none;
}

.device-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.device-form input[type="password"] {
  min-width: 0;
  width: 180px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-m);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
}

.device-form .device-submit {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(255, 107, 107, 0.5);
  border-radius: 999px;
  background: none;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== 曲の詳細の「この曲に近い曲」 ===== */
.similar-songs {
  max-width: 720px;
  margin: 24px 0;
}

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

.trial-search {
  scroll-margin-top: 12px;
}

/* ===== 辞書の曲のジャケット ===== */
.song-artwork {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-s);
  object-fit: cover;
  background: var(--bg-raised);
}

.trial-song {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trial-song .song-artwork {
  width: 36px;
  height: 36px;
}

.match-pick-text + .song-artwork,
.match-picks li .song-artwork {
  width: 44px;
  height: 44px;
}

/* 検索結果の1行（並べ方は tabs.css の「曲の1行」） */
.search-results li {
  overflow: hidden;
}


/* 一部だけ読み直す枠（Turbo Frame）は、ふつうの箱として並べる */
turbo-frame {
  display: block;
}

/* 「もっと見る」で足していく枠は、箱を作らない（中の曲が、外の並びにそのまま入る） */
turbo-frame.page-frame {
  display: contents;
}

.more-row {
  flex-basis: 100%;
  grid-column: 1 / -1;
  margin: 12px 0;
  text-align: center;
}

.more-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 13px;
  text-decoration: none;
}

/* ===== 辞書の曲の詳細（/songs/:id） ===== */
.song-detail {
  max-width: 760px;
}

.song-detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-start;
}

.song-detail-head .song-artwork {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-m);
}

/* ===== 曲の詳細：ジャケットのまわり（iPhone の再生画面のように） =====
   ・まわり：ジャケットと同じ画像を大きくぼかして、ジャケットの色の雲にする（.song-hero-glow）
   ・影：ジャケットの下に、ぼかしたジャケットを少しずらして置く（.song-hero-shadow。ジャケットの色の影になる）
   ・その曲が流れているあいだは、ジャケットが少し大きくなって、まわりの色が少し濃くなる（player.js が is-playing を付ける）
   色の濃さは opacity、ぼかしの大きさは blur() の数字で変えられる */
.song-hero {
  position: relative;
  isolation: isolate; /* ぼかしを、このブロックの文字やボタンより後ろに置く */
  margin-top: 16px;   /* 流れているあいだジャケットが少し大きくなっても、上の線にかからないように */
}

/* ぼかしより前に出す：曲の詳細の、ジャケットの欄より下にあるもの（感性・近い曲など） */
.song-detail > :not(.song-hero) {
  position: relative;
}

.song-hero > .song-detail-text {
  position: relative;
  z-index: 1; /* 影より前に出す（スマホでは、ジャケットのすぐ下に曲名が来るので） */
}

.song-hero-art {
  position: relative;
  flex: none;
  width: 200px;
  height: 200px;
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.15);
}

.song-hero-art .song-artwork {
  position: relative;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.song-hero-glow,
.song-hero-shadow {
  position: absolute;
  z-index: -1;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.song-hero-glow {
  top: -180px; /* 画像の場所は前と同じ（-80px）。まわりのあき 100px の分だけ外へ */
  left: -180px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  /* iPhone（Safari・LINE の中のブラウザ）は、ぼかしを画像の四角の外に広げずに切ってしまう。
     まわりに 100px のあき（padding）を作って、その中でぼかし、ふちは丸くうすくしていく（mask） */
  box-sizing: content-box;
  padding: 100px;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 60%, transparent 100%);
  filter: blur(60px) saturate(1.6);
  opacity: 0.4;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.song-hero-shadow {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  filter: blur(14px) saturate(1.4);
  opacity: 0.55;
  transform: translateY(10px) scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.song-hero-glow[hidden],
.song-hero-shadow[hidden] {
  display: none;
}

.song-hero.is-playing .song-hero-art {
  transform: scale(1.05);
}

.song-hero.is-playing .song-hero-glow {
  opacity: 0.6;
  transform: scale(1.12);
}

.song-hero.is-playing .song-hero-shadow {
  opacity: 0.75;
  transform: translateY(16px) scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
  .song-hero-art,
  .song-hero-glow,
  .song-hero-shadow {
    transition: none;
  }
}

.song-detail-text {
  flex: 1 1 260px;
  min-width: 0;
}

.song-detail-text h1 {
  margin: 0 0 2px;
  font-size: 22px;
}

.song-detail-artist {
  margin: 0 0 10px;
  color: rgba(237, 237, 234, 0.88); /* ジャケットの色のぼかしの上でも読めるように、ふつうの灰色より白く */
  font-size: 14px;
}

.song-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 4px;
  margin-top: 14px;
}

.song-detail-actions form,
.result-actions form {
  margin: 0;
}

/* 並べる順（Figma）：▶︎ 再生・♥・あとで聴く・シェア・出さない ／ 次の行に Apple Music・Spotify */
.song-detail-actions > .play-button { order: -5; margin-right: 6px; }
.song-detail-actions > .post-song,
.song-detail-actions > .heart-button,
.song-detail-actions > form:has(.oshi-button) { order: -4; }
.song-detail-actions > .bookmark-button { order: -3; }
.song-detail-actions > .share-icon { order: -2; }
.song-detail-actions > form:has(.mute-icon) { order: -1; }
.song-detail-actions::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
.song-detail-actions > .listen-link,
.song-detail-actions > .listen-spotify { order: 2; }
.song-detail-actions > a:not(.listen-link) { order: 3; font-size: 13px; }

/* ジャンル（チップの形）・雰囲気・発売日 */
.song-detail-text .result-meta {
  margin: 0 0 4px;
  color: rgba(237, 237, 234, 0.8);
  font-size: 12px;
}

/* 曲名のまわり：明るいジャケット（白いジャケットなど）のぼかしの上でも読めるように、文字を白めにして、うすい影をつける */
.song-hero .song-detail-text {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.song-hero .release-date {
  color: inherit;
}

.song-hero .song-detail-actions .oshi-button:not(.is-on),
.song-hero .song-detail-actions .bookmark-icon,
.song-hero .song-detail-actions .share-icon,
.song-hero .song-detail-actions .mute-icon:not(.is-on) {
  color: rgba(237, 237, 234, 0.88);
}

.song-hero .listen-link,
.song-hero .listen-spotify,
.song-detail-text .result-meta a[href*="genre="] {
  border-color: rgba(237, 237, 234, 0.32);
  background: rgba(10, 10, 11, 0.35); /* ぼかしが明るくても、ボタンの中は暗く */
}

.song-detail-text .result-meta a[href*="genre="] {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-right: 6px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 12px;
  text-decoration: none;
}

/* ===== この曲の感性（Figma の「感性メーター」） ===== */
.sense h4 {
  margin: 32px 0 10px;
  font-size: 17px;
}

.sense-meter {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  margin: 0 0 10px;
}

.sense-name {
  color: var(--text-secondary);
  font-size: 12px;
}

.sense-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.sense-bar span {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-raised);
}

.sense-bar span.is-on {
  background: var(--fill-strong);
}

.sense-value {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
}

.similar-songs h4 {
  margin: 32px 0 4px;
  font-size: 17px;
}

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

/* ===== スマホ：曲の詳細は まん中にそろえる（Figma の「02 曲の詳細」） ===== */
@media (max-width: 640px) {
  .song-detail-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .song-detail-text {
    flex: none;
    width: 100%;
  }

  .song-hero-art,
  .song-detail-head .song-artwork {
    width: 220px;
    height: 220px;
  }

  /* スマホは画面がせまいので、ぼかしを小さく・うすく（大きいままだと画面じゅうが色の雲になる）
     260px の画像を、ジャケットのまん中に置く（あき 80px の分だけ外へ） */
  .song-hero-glow {
    top: -100px;
    left: calc(50% - 210px);
    width: 260px;
    height: 260px;
    padding: 80px;
    filter: blur(40px) saturate(1.5);
    opacity: 0.32;
  }

  .song-detail-actions {
    justify-content: center;
  }

  .song-hero.is-playing .song-hero-glow {
    opacity: 0.48;
    transform: scale(1.08); /* 画面の横にはみ出さない大きさまで */
  }

  .song-detail-text h1 {
    margin-top: 10px;
  }
}

/* 曲名のリンク（押すと曲の詳細） */
.result-link {
  color: inherit;
  text-decoration: none;
}

.result-link:hover {
  text-decoration: underline;
}

/* 「投稿する」ボタン（ボタン1つで投稿） */
.post-song {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-song-button {
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: none;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}

.post-song-button:hover {
  background: var(--search-soft);
}

.post-song-done {
  color: var(--text-secondary);
  font-weight: bold;
  font-size: 0.9em;
}

/* ===== まだ1曲も投稿していない人へのあんない ===== */
.welcome-box,
.seed-welcome {
  max-width: 640px;
  margin: 12px 0 20px;
  padding: 16px;
  border: 0;
  border-radius: var(--radius-l);
  background: var(--bg-surface);
}

.welcome-box p {
  margin: 0 0 8px;
}

.welcome-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;
}

.seed-start {
  margin-bottom: 4px;
}

/* 投稿の検索（ブラウザで探しているあいだ） */
.search-status {
  color: var(--text-secondary);
}

/* 発売日（まだわからない曲は、ブラウザが iTunes で探して入れる） */
.release-date {
  color: var(--search-muted);
  font-size: 0.9em;
}

.release-date[data-itunes-date] {
  display: inline-block;
  min-width: 1px;
  min-height: 1em;
}

/* 曲の詳細へのボタン */
.detail-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: inherit;
  font-size: 12px;
  text-decoration: none;
}

.detail-button:hover {
  background: var(--search-soft);
}

/* 曲をさがすの「辞書にない曲」（Apple Music からさがしたもの） */
.other-songs {
  margin-top: 20px;
}

.search-post-failed {
  color: var(--text-tertiary);
  font-size: 12px;
}

/* ===== 紹介リンク（app/models/affiliate.rb に番号を入れたときだけ出る） ===== */
/* 「PR」のしるし（小さく、文字の色のまま） */
.pr-mark {
  display: inline-block;
  margin-left: 4px;
  padding: 0 3px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 9px;
  line-height: 1.3;
  vertical-align: 1px;
  opacity: 0.7;
}

/* 曲のページの「この曲の CD・グッズを Amazon で見る」 */
.goods-link {
  margin: 10px 0 0;
  font-size: 13px;
}

.goods-note {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
}

.affiliate-note {
  margin-top: 24px;
  font-size: 12px;
}

/* ===== このサイトについて（/about） ===== */
.about-page {
  max-width: 720px;
  font-size: 14px;
  line-height: 1.7;
}

.about-page h2 {
  margin-top: 28px;
  font-size: 18px;
}

.about-page h3 {
  margin: 20px 0 4px;
  font-size: 15px;
}

.about-page ul {
  margin: 4px 0;
  padding-left: 1.2em;
}

.about-date {
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 12px;
}

/* どのページにも出る、小さい1行のリンク */
.site-footer {
  margin: 32px 0 8px;
  font-size: 11px;
  text-align: center;
}

.site-footer a {
  color: var(--text-tertiary);
  text-decoration-color: var(--border-subtle);
}

/* ===== 2段階認証（/two_factor） ===== */
.two-factor-qr svg {
  display: block;
  width: 200px;
  height: 200px;
  margin: 8px 0;
  padding: 12px; /* 読み取りやすいように、まわりに白い余白（QR は白い地のまま） */
  border-radius: var(--radius-m);
  background: #ffffff;
}

.two-factor-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}

.two-factor-form input[type="text"] {
  max-width: 200px;
  letter-spacing: 2px;
}

.two-factor-submit {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: none;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

.backup-codes {
  font-size: 16px;
  line-height: 1.9;
}

/* ===== アーティスト名（押すとアーティストのページへ）：ふだんは文字のまま、のせると下線 ===== */
.artist-link {
  color: inherit;
  text-decoration: none;
}

.artist-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== アーティストのページ（/artists/:name） ===== */
.artist-hero {
  padding: 28px 0 8px;
}

.artist-kicker {
  margin: 0 0 4px;
  color: rgba(237, 237, 234, 0.8);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.artist-hero h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}

.artist-meta {
  margin: 8px 0 0;
  color: rgba(237, 237, 234, 0.85);
  font-size: 13px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.artist-meta a {
  color: inherit;
}

.artist-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.artist-actions .listen-link {
  border-color: rgba(237, 237, 234, 0.32);
  background: rgba(10, 10, 11, 0.35);
}

.artist-songs,
.artist-oshi {
  margin-top: 28px;
}
