/* ライブ詳細・記事で共用するメンバー比較。 */
.live-member-comparison { margin-top: 8px; padding: 12px; background: #fafafa; border-radius: 12px; }
.live-formation-pair { --live-panel-gap: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--live-panel-gap); }
.live-formation-single { grid-template-columns: minmax(0, 1fr); }
.live-member-panel { min-width: 0; }
/* パネル間の余白に区切り線を置き、フォーメーションの幅を保つ。 */
.live-formation-pair > .live-member-panel + .live-member-panel { position: relative; }
.live-formation-pair > .live-member-panel + .live-member-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--live-panel-gap) / -2);
  width: 1px;
  background: #e2e2e2;
  pointer-events: none;
}
/* 端のメンバーの外側にも強調枠を表示する。 */
.live-member-panel .song-formation-fit { overflow: visible; }
.live-member-panel .live-member-panel-heading, .live-position-mappings .live-position-mappings-heading { margin: 0 0 8px; padding: 0; background: none; border: 0; font-size: 14px; }
.live-member-panel .live-member-panel-heading > span { margin-left: 8px; color: #888; font-size: 12px; font-weight: normal; }
.live-member-panel .single-formation { --song-formation-gap: 4px; margin: 10px 0 6px; }
.live-member-panel .single-formation-member { padding: 8px 1px; border-radius: 5px; }
.live-member-panel .single-formation-name-pc { display: none; }
.live-member-panel .single-formation-name-sp { display: inline; }
/* 比較欄ではセンターを太枠、当日の代替を背景色で表示する。 */
.live-member-panel .single-formation-center:not(.single-formation-tinted) { background: #fff; }
.live-member-panel-original .live-position-changed { border-style: dashed; border-color: #af730f; }
.live-member-roster { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.live-member-roster > span { white-space: nowrap; }
.live-member-roster > .live-member-roster-group { display: inline-flex; flex-wrap: wrap; gap: 6px 12px; max-width: 100%; }
.live-member-roster-group > span { white-space: nowrap; }
.live-member-roster .live-member-roster-label { width: 100%; margin: 8px 0 0; color: #888; font-size: 11px; }
.live-member-legend { margin: 8px 0 0; font-size: 11px; color: #777; }
.live-position-mappings { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e2e2e2; }
.live-position-mappings .live-position-mappings-heading small { display: inline-block; margin-left: 8px; font-size: 11px; color: #888; font-weight: normal; }
.live-position-mappings ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.live-position-mappings li { display: inline-flex; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 5px; font-size: 12px; background: #fff; }
.live-position-mappings .live-mapping-changed { background: #fff1db; }
.live-position-mappings .live-mapping-group { max-width: 100%; }
.live-mapping-names { min-width: 0; }
.live-mapping-name { display: inline-block; white-space: nowrap; }
.live-mapping-arrow { color: #888; }
.live-member-comparison .live-position-highlight { outline: 2px solid #af730f; outline-offset: 2px; }
/* タッチ時の配置は選択操作。長押しのリンクメニュー・文字選択を抑える。 */
.live-member-comparison.live-touch-mode .song-member-link,
.live-member-comparison.live-touch-mode [data-original-slot] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.live-mc-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; font-size: 13px; line-height: 1.7; }
.live-mc-line { display: flex; align-items: baseline; min-width: 0; }
.live-mc-line > div { min-width: 0; }
.live-mc-label { flex: 0 0 auto; white-space: nowrap; }
.live-mc-member { display: inline-block; white-space: nowrap; }
.live-mc-roles { min-width: 0; border-left: 1px solid #e2e2e2; padding-left: 12px; }
.live-mc-roles .live-mc-line + .live-mc-line { margin-top: 3px; }
.live-message-flower-panel .live-representative-heading { margin: 0 0 4px; padding: 0; border: 0; background: none; font-size: 13px; line-height: 1.7; }
@media (max-width: 768px) {
  .live-member-comparison { padding: 10px 8px; }
  .live-mc-panel { gap: 8px; font-size: 12px; }
  .live-mc-roles { padding-left: 8px; }
  .live-formation-pair { --live-panel-gap: 16px; grid-template-columns: minmax(0, 1fr); }
  .live-formation-pair > .live-member-panel + .live-member-panel::before {
    top: calc(var(--live-panel-gap) / -2);
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 1px;
  }
  .live-position-mappings .live-position-mappings-heading small { display: block; margin: 3px 0 0; }
  .live-position-mappings ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .live-position-mappings li {
    min-width: 0;
    gap: 3px;
    padding: 4px 5px;
    font-size: 11px;
    line-height: 1.5;
  }
  /* 変更なしの文言や複数人をまとめた項目は、横幅全体を使う。 */
  .live-position-mappings li:not(.live-mapping-changed),
  .live-position-mappings .live-mapping-group { grid-column: 1 / -1; }
  /* 記事の自動整形で挿入される改行が、項目内の間隔を広げるのを防ぐ。 */
  .live-position-mappings li > br { display: none; }
  .live-position-mappings li > .song-member-link { min-width: 0; overflow-wrap: anywhere; }
  .live-position-mappings .live-mapping-arrow { flex-shrink: 0; }
}
