/* フォローと MUSIC MATCH の見た目（app/assets/stylesheets/match.css） */
/* 色はここでまとめて決める。Figmaでデザインを決めたら差し替える */
.match,
.follow,
.friends {
  --match-bg: var(--bg-surface);       /* MUSIC MATCH のカードの背景 */
  --match-panel: var(--bg-raised);    /* おすすめの曲の箱 */
  --match-text: var(--text-primary);
  --match-muted: var(--text-secondary);
  --match-heart: var(--accent);
  --follow-color: var(--fill-strong);
}

/* ===== フォロー ===== */
.follow {
  margin: 8px 0 16px;
}

.follow-button {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--follow-color);
  border-radius: 999px;
  background: var(--follow-color);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.follow-button.is-following {
  border-color: var(--border-default);
  background: transparent;
  color: var(--text-primary);
}

.follow-counts strong {
  margin-right: 4px;
}

.friends ul {
  padding-left: 1.2em;
}

.friends li {
  margin: 4px 0;
}

.match-link {
  margin-left: 8px;
  font-weight: bold;
}

/* ===== MUSIC MATCH ===== */
.match {
  max-width: 460px;
  margin: 0 auto;
}

.match-card {
  background: var(--match-bg);
  color: var(--match-text);
  border-radius: 20px;
  padding: 24px 22px;
  margin-bottom: 16px;
}

.match-card p {
  margin: 0;
}

.match-title {
  font-size: 1.6em;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 16px !important;
}

/* あなたとの友達の四角を左右に、ハートをまん中に */
.match-people {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  gap: 8px;
}

.match-square {
  aspect-ratio: 1;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6em;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
}

.match-person-name {
  text-align: center;
  margin-top: 8px !important;
  font-weight: bold;
}

.match-heart {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--match-heart);
  stroke-width: 2;
  justify-self: center;
  margin-top: -28px; /* 名前の分だけ上にずらして、四角のまん中にそろえる */
}

/* 相性の%（大きく） */
.match-rate {
  text-align: center;
  font-size: 3.2em;
  font-weight: 900;
  margin-top: 16px !important;
  line-height: 1.1;
}

.match-rate-label {
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 12px !important;
}

.match-reasons {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  color: var(--match-muted);
  font-size: 0.9em;
  line-height: 1.7;
}

.match-note {
  color: var(--match-muted);
  font-size: 0.85em;
}

/* 2人におすすめの曲 */
.match-picks {
  background: var(--match-panel);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 18px;
}

.match-picks-title {
  font-size: 1.15em;
  font-weight: 900;
  margin-bottom: 4px !important;
}

.match-picks ol {
  margin: 10px 0 0;
  padding-left: 1.3em;
}

.match-picks li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-default);
}

.match-picks li:last-child {
  border-bottom: none;
}

.match-pick-song {
  font-weight: bold;
  font-size: 1.05em;
}

.match-pick-meta {
  color: var(--match-muted);
  font-size: 0.85em;
}

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

.match-pick-actions a {
  color: var(--match-text);
  font-size: 0.9em;
}

/* ===== フォロー数・フォロワー数（押すと一覧） ===== */
.follow-counts {
  display: flex;
  gap: 16px;
}

.follow-counts a {
  color: inherit;
  text-decoration: none;
}

.follow-counts a:hover {
  text-decoration: underline;
}

/* ===== フォローしている人・フォロワーの一覧 ===== */
.follow-tabs {
  display: flex;
  gap: 8px;
}

.follow-tab {
  padding: 4px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.follow-tab.is-on {
  border-color: var(--fill-strong);
  background: var(--fill-strong);
  color: var(--text-inverse);
  font-weight: bold;
}

.follow-list {
  max-width: 560px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

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

.follow-list li form {
  margin: 0 0 0 auto;
}

.follow-list-name {
  font-weight: bold;
}

.follow-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--fill-strong);
  font-size: 0.8em;
}

.follow-small {
  padding: 3px 12px;
  font-size: 0.85em;
}

/* 友達のページに出す MUSIC MATCH */
.match-on-profile {
  margin: 12px 0 24px;
}

/* おすすめの曲に、ジャケットを左に並べる */
.match-picks li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.match-pick-text {
  flex: 1 1 160px;
  min-width: 0;
}

/* 一覧の1人ぶんの「友達」の印とフォローボタン（右によせる） */
.follow-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.follow-row-actions form {
  margin: 0;
}

.match-pick-link {
  color: inherit;
  text-decoration: none;
}

.match-pick-link:hover {
  text-decoration: underline;
}

.match-pick-actions .post-song-button {
  background: transparent;
  border-color: var(--match-muted);
  color: var(--match-text);
}

.match-pick-actions .post-song-done {
  color: #7fe0a8;
}

/* MUSIC MATCH：2人の音楽タイプ */
.match-types {
  margin: 8px 0 2px;
  font-weight: bold;
  text-align: center;
}

.match-types-note {
  margin: 0 0 8px;
  color: var(--match-muted);
  font-size: 0.9em;
  text-align: center;
}
