/* MUSIC DNA カードと招待の見た目（app/assets/stylesheets/card.css） */

/* カードの絵：画面の幅に合わせて小さく表示する（保存される画像は 1080×1350） */
.share-card-image svg {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 16px;
}

/* ストーリー用（縦長）の絵は、画面では細めに出す */
.share-card-story .share-card-image svg {
  max-width: 320px;
}

.share-title {
  margin: 16px 0 8px;
  font-size: 1.1em;
}

.share-more {
  margin: 16px 0;
}

.share-more summary {
  cursor: pointer;
  font-weight: bold;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* 小さな丸いボタン（アイコン＋短い文字）。「共有」だけ白くぬる */
.share-buttons button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

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

.share-buttons .share-only-icon {
  justify-content: center;
  width: 30px;
  padding: 0;
}

.share-buttons .share-main {
  border-color: var(--fill-strong);
  background: var(--fill-strong);
  color: var(--text-inverse);
}

.share-buttons .share-main:hover {
  background: var(--fill-strong);
  opacity: 0.9;
}

.share-buttons button[aria-expanded="true"] {
  background: var(--bg-raised);
}

/* リンク（招待リンクだけ） */
.share-link {
  display: flex;
  gap: 6px;
  align-items: center;
  max-width: 420px;
  margin-top: 8px;
}

.share-link[hidden] {
  display: none;
}

.share-link input {
  flex: 1;
  min-width: 0;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-m);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 12px;
}

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

/* 埋め込みのコード */
.share-embed {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  max-width: 420px;
  margin-top: 8px;
}

.share-embed[hidden] {
  display: none;
}

.share-embed textarea {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-m);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  resize: none;
}

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

.share-message {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.share-note {
  max-width: 420px;
  margin: 4px 0 0;
  color: var(--text-tertiary);
  font-size: 12px;
}

.card-note {
  font-size: 0.9em;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* 招待ページのボタンの色（follow-button の形は match.css にある） */
.invite-page {
  --follow-color: var(--fill-strong);
}

/* リンクをボタンの見た目にする */
a.follow-button {
  display: inline-block;
  text-decoration: none;
}

/* MUSIC MATCH の黒いカードの中のリンク（「曲を投稿する」）を読みやすく */
.match-note a {
  color: var(--text-primary);
}

/* ===== 招待ページの「登録前に相性お試し」 ===== */
.trial {
  max-width: 560px;
}

.trial .match {
  margin: 0 0 12px; /* お試しの相性カードは左寄せ */
}

.trial-hint,
.trial-skip {
  font-size: 0.9em;
}

.trial-list-title {
  font-weight: bold;
  margin: 16px 0 4px;
}

.trial-songs,
.trial-chosen {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.trial-chosen {
  padding-left: 1.4em;
  list-style: decimal;
}

.trial-songs li,
.trial-chosen li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.trial-chosen li {
  display: list-item; /* 番号を出すため */
}

.trial-chosen li form {
  display: inline-block;
  margin-left: 8px;
}

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

.trial-song-actions form {
  margin: 0;
}

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

.trial-remove {
  padding: 2px 10px;
  font-size: 0.85em;
  cursor: pointer;
}

.trial-search {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
}

.trial-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
}

/* 1年分の長いレシート（画面では細めに。保存される画像は横1080） */
.share-card-year .share-card-image svg {
  max-width: 420px;
  margin-top: 12px;
}

.year-link {
  margin: 16px 0;
}
