/* ==========================================================================
   amdb — 雨と活字の記録庫 (Rain & Typography Archive)
   ゼロ外部依存・高可読性データベースUI スタイルシート
   ========================================================================== */

:root {
  --bg: #f6f5f0;
  --bg-elev: #ffffff;
  --bg-sub: #efece4;
  --seg-bg: #f3f2ed;
  --bg-hover: #e7e3d8;
  --ink: #15171a;
  --ink-muted: #555b64;
  --ink-faint: #787f89;
  --border: #dcd9d0;
  --border-strong: #c2bdb0;
  --accent: #27445c;
  --accent-hover: #1b3144;
  --accent-soft: rgba(39, 68, 92, 0.08);
  --accent-ink: #ffffff;

  /* カテゴリ別インク色 (ライト) */
  --cat-live-bg: #e7eef4;
  --cat-live-fg: #203e57;
  --cat-release-bg: #f4e7e7;
  --cat-release-fg: #732626;
  --cat-event-bg: #e6f0ec;
  --cat-event-fg: #225444;
  --cat-media-bg: #ece9f4;
  --cat-media-fg: #443566;
  --cat-news-bg: #ebedef;
  --cat-news-fg: #434950;
  --cat-apologies-bg: #f3ede2;
  --cat-apologies-fg: #66481e;
  --cat-other-bg: #eceae4;
  --cat-other-fg: #5c5952;

  --warn-bg: #fbf4e4;
  --warn-border: #dfca96;
  --warn-fg: #5e4412;

  --font-sans: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(21, 23, 26, 0.05);
  --shadow-md: 0 6px 20px rgba(21, 23, 26, 0.08);
  --shadow-lg: 0 18px 42px rgba(21, 23, 26, 0.16);
  --container-max: 1120px;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-elev: #171a20;
  --bg-sub: #1f242c;
  --seg-bg: #22262e;
  --bg-hover: #262c36;
  --ink: #eae8e1;
  --ink-muted: #a1a8b3;
  --ink-faint: #757c87;
  --border: #2b313b;
  --border-strong: #3d4554;
  --accent: #7da8cc;
  --accent-hover: #9bc0df;
  --accent-soft: rgba(125, 168, 204, 0.14);
  --accent-ink: #0f1115;

  /* カテゴリ別インク色 (ダーク) */
  --cat-live-bg: rgba(125, 168, 204, 0.16);
  --cat-live-fg: #a4c9e8;
  --cat-release-bg: rgba(224, 134, 134, 0.16);
  --cat-release-fg: #ebb1b1;
  --cat-event-bg: rgba(114, 194, 166, 0.15);
  --cat-event-fg: #9ce0c7;
  --cat-media-bg: rgba(168, 148, 224, 0.16);
  --cat-media-fg: #c9baf2;
  --cat-news-bg: rgba(161, 168, 179, 0.16);
  --cat-news-fg: #c6ccd4;
  --cat-apologies-bg: rgba(214, 177, 110, 0.16);
  --cat-apologies-fg: #e6c68e;
  --cat-other-bg: rgba(160, 156, 148, 0.15);
  --cat-other-fg: #bab5ab;

  --warn-bg: rgba(214, 177, 110, 0.12);
  --warn-border: rgba(214, 177, 110, 0.35);
  --warn-fg: #ead09b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  font-feature-settings: "palt";
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.num,
time,
.tabular {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---------- Header & Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding-block: 6px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand-sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  display: none;
}
@media (min-width: 640px) {
  .brand-sub {
    display: inline;
  }
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
}
.icon-btn:hover {
  background: var(--bg-sub);
  border-color: var(--border-strong);
  text-decoration: none;
  color: var(--ink);
}

.kbd {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--ink-muted);
  background: var(--bg-elev);
}
@media (min-width: 720px) {
  .kbd {
    display: inline-block;
  }
}

.site-nav {
  border-top: 1px solid var(--border);
  background: var(--bg-sub);
}

.nav-scroll {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 6px;
}
.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover {
  background: var(--bg-hover);
  color: var(--ink);
  text-decoration: none;
}
.nav-link.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.nav-count {
  font-size: 0.72rem;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

/* ---------- Main Layout ---------- */

.site-main {
  flex: 1 0 auto;
  min-width: 0;
  padding-block: 24px 48px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--ink-muted);
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb-sep {
  color: var(--ink-faint);
}

/* ---------- Typography & Headers ---------- */

.page-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 8px 0 6px;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.page-lead {
  color: var(--ink-muted);
  margin: 6px 0 0;
  font-size: 0.94rem;
}

.section {
  margin-top: 28px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0;
}

.section-sub {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* ---------- Badges & Pills ---------- */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.45;
  background: var(--bg-sub);
  color: var(--ink-muted);
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge--live { background: var(--cat-live-bg); color: var(--cat-live-fg); }
.badge--release { background: var(--cat-release-bg); color: var(--cat-release-fg); }
.badge--event { background: var(--cat-event-bg); color: var(--cat-event-fg); }
.badge--media { background: var(--cat-media-bg); color: var(--cat-media-fg); }
.badge--news { background: var(--cat-news-bg); color: var(--cat-news-fg); }
.badge--apologies { background: var(--cat-apologies-bg); color: var(--cat-apologies-fg); }
.badge--other { background: var(--cat-other-bg); color: var(--cat-other-fg); }
.badge--outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink-muted);
}
.badge--warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-fg);
}

/* ---------- Cards & Grids ---------- */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.family-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.family-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--ink);
}
.family-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.family-card-name {
  font-size: 1.06rem;
  font-weight: 700;
}
.family-card-count {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.family-card-desc {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.two-col > * {
  min-width: 0;
}
@media (min-width: 840px) {
  .two-col {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: start;
  }
}

/* ---------- Hero (Home) ---------- */

.hero {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.hero--compact {
  padding: 20px 22px;
}

.hero-count {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.hero-count strong {
  font-size: 1.25rem;
  color: var(--ink);
  margin-inline: 2px;
}

.hero-note {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.search-box-wrap {
  position: relative;
  max-width: 660px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.96rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
}
.search-input::placeholder {
  color: var(--ink-faint);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  text-decoration: none;
}
.btn-secondary {
  background: var(--bg-elev);
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--bg-sub);
  color: var(--ink);
  text-decoration: none;
}

.instant-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
}
.instant-dropdown[hidden] {
  display: none;
}

/* ---------- Definition Lists / Metadata ---------- */

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.meta-row {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--border);
}
.meta-row:last-child {
  border-bottom: none;
}
@media (min-width: 600px) {
  .meta-row {
    grid-template-columns: 170px 1fr;
  }
}

.meta-key {
  background: var(--bg-sub);
  padding: 9px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.meta-val {
  padding: 9px 14px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

/* E3: タイムライン詳細の地域名／会場名 2 行表示 */
.meta-venue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meta-venue-item {
  line-height: 1.5;
}
.meta-venue-region {
  font-size: 0.84rem;
}

/* ---------- Callouts & Band Members ---------- */

.member-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg-sub);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.87rem;
}

.callout {
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  margin-bottom: 16px;
}
.callout--warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-fg);
}
.callout--quote {
  border-left: 4px solid var(--accent);
  background: var(--bg-sub);
  font-size: 0.98rem;
}
.callout-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

/* ---------- Tables ---------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* M6: 長い表の折りたたみ（Internal 関係表） */
.fold-toggle {
  margin-top: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--accent);
  font-size: 0.85rem;
  cursor: pointer;
}
.fold-toggle:hover {
  background: var(--accent-soft);
}
tr.fold-extra[hidden] {
  display: none;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.data-table th {
  background: var(--bg-sub);
  color: var(--ink-muted);
  font-size: 0.79rem;
  font-weight: 700;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--accent-soft);
}

.col-num {
  width: 56px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

.col-date {
  min-width: 126px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

/* ---------- D2: Sortable Table Date Header ---------- */

.th-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.th-sort-btn:hover {
  color: var(--accent);
}
.sort-indicator {
  font-size: 0.72em;
  color: var(--accent);
}

/* ---------- D1: Detail 2-Column Layout & Tabs ---------- */

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

@media (min-width: 900px) {
  .detail-layout {
    grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
    gap: 24px;
  }
  .detail-layout--single {
    grid-template-columns: minmax(0, 780px);
  }
}

.detail-aside,
.detail-main {
  min-width: 0;
}

.detail-aside .stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  margin-bottom: 16px;
}

@media (min-width: 900px) {
  .detail-aside .meta-row {
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .detail-aside .meta-key {
    padding: 8px 11px;
  }
  .detail-aside .meta-val {
    padding: 8px 12px;
  }
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 14px;
}

.tab-bar .era-check {
  margin-left: auto;
  align-self: center;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s ease, background 0.15s ease;
}
.tab-btn:hover {
  color: var(--ink);
  background: var(--bg-sub);
}
.tab-btn.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-elev);
}

.tab-count {
  font-size: 0.75rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-sub);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.tab-btn.is-active .tab-count {
  background: var(--accent-soft);
  color: var(--accent);
}



.setlist-media {
  margin-bottom: 4px;
  font-weight: 600;
}

.setlist-media-dest {
  font-weight: 400;
}

.setlist-media-label {
  display: block;
}

@media (min-width: 720px) {
  .setlist-media {
    display: flex;
    gap: 0.5em;
  }
}

.setlist-media-note {
  margin-bottom: 8px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.filter-chip {
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-chip:hover {
  color: var(--ink);
}

.filter-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

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

.flow-block {
  margin-bottom: 18px;
}

/* ---------- B5: Setlist Continuous Connection Lines ---------- */

.setlist-table th.setlist-num,
.setlist-table td.setlist-num {
  width: 54px;
  text-align: center;
}

.setlist-table td.setlist-num {
  position: relative;
}

.setlist-num-val {
  position: relative;
  z-index: 1;
  display: inline-block;
  line-height: 1.4;
}

.setlist-table tbody tr.is-conn-next td {
  border-bottom: none;
}

.setlist-table tbody tr.is-conn-next td.setlist-num::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(9px + 1.4em + 2px);
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.72;
}

.setlist-table tbody tr.is-conn-prev td.setlist-num::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  height: 7px;
  width: 2px;
  background: var(--accent);
  opacity: 0.72;
}

.setlist-style {
  font-size: 0.87rem;
  color: var(--ink-muted);
}

/* ---------- B6 & B7: Member Grid & Inline News List ---------- */

.member-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 5px;
}

.member-row {
  display: contents;
}

.member-role {
  color: var(--ink-muted);
  font-size: 0.87rem;
  white-space: nowrap;
}

.member-person {
  font-weight: 500;
}

.meta-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-news-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.meta-news-date {
  font-size: 0.84rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Credit Panel ---------- */

.credit-heading {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--ink);
}
.credit-heading:first-child {
  margin-top: 0;
}
.credit-song {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--ink);
}
.credit-table th {
  width: 11em;
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Disc / Recording Groups ---------- */

.disc-group {
  margin-bottom: 18px;
}
.disc-group:last-child {
  margin-bottom: 0;
}
.disc-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}

.disc-source {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.edition-tabs .tab-bar {
  margin-bottom: 12px;
}

.segment-row td {
  background: var(--seg-bg);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 10px;
}

/* ---------- Arrangement Connection Flow ---------- */

.flow-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.flow-node {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 14px;
  background: var(--bg-sub);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.flow-node:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.flow-node-step {
  font-size: 0.7rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.flow-arrow {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 700;
  padding-inline: 2px;
}

/* ---------- Filter Controls & Lists ---------- */

.filter-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}

.filter-select {
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.87rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* CHAMELEON LIFE時代トグル: フィルター末尾の項目の隣に並ぶ無地のチェック（2026-11-22 佐藤） */
.era-check { display: inline-flex; align-items: center; margin-left: 10px; vertical-align: middle; }
.era-check input { opacity: .55; }
/* トグルON時にステータス横へ出す小さな注記 */
.era-note { margin-left: .6em; font-size: .85em; color: var(--ink-muted); }
.era-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
.era-bar .era-note { margin-left: 0; visibility: hidden; }
.era-bar.is-on .era-note { visibility: visible; }
.data-table tbody tr[hidden] { display: none; }

/* 公演ページの前後ナビ */
.tl-nav { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 8px; }
.tl-nav-row { display: flex; align-items: baseline; gap: 12px; }
.tl-nav-row > * { flex: 1; min-width: 0; }
.tl-nav-row > :last-child { text-align: right; }
.tl-nav-label { flex: 0 1 auto; text-align: center; color: var(--ink-muted); font-size: .85em; white-space: nowrap; }
.tl-nav-date { color: var(--ink-muted); font-size: .88em; }

/* Internal: wiki用テキスト */
.wiki-text-area { width: 100%; box-sizing: border-box; font-family: ui-monospace, monospace; font-size: .85em; line-height: 1.6; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--seg-bg); color: inherit; }
.wiki-text-actions { margin-top: 8px; text-align: right; }

/* 楽曲リストのアーティストピルは固定2段組（2026-11-20 佐藤）：
   左に「すべてのアーティスト」を縦に置き、右の列は CHAMELEON LIFE の後で必ず折り返す */
.pill-group--artist { flex-wrap: nowrap; align-items: flex-start; }
.pill-col-all { flex: 0 0 auto; }
.pill-col-artists {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  align-content: flex-start;
}
.pill-break { flex: 0 0 100%; height: 0; }

/* スマホでは2段組を適用せず、通常の折り返しに戻す（2026-11-20 佐藤） */
@media (max-width: 599px) {
  .pill-group--artist { flex-wrap: wrap; }
  .pill-col-all, .pill-col-artists { display: contents; }
  .pill-break { display: none; }
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.pill-btn:hover {
  background: var(--bg-sub);
  color: var(--ink);
}
.pill-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.pill-btn.is-zero {
  opacity: 0.5;
}
.pill-count {
  font-size: 0.75rem;
  opacity: 0.82;
  font-variant-numeric: tabular-nums;
}

/* E6: タイムライン一覧カスケードフィルター */
.cascade-filters {
  border-top: 1px dashed var(--border-strong);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cascade-filters[hidden] {
  display: none;
}
.cascade-cat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.cascade-cat-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cascade-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-items: start;
}
@media (min-width: 680px) {
  .cascade-group {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
  }
}
.cascade-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.result-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.record-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.record-item {
  border-bottom: 1px solid var(--border);
}
.record-item:last-child {
  border-bottom: none;
}

.record-link {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 5px;
  /* 日付とピルの文字位置はベースラインで揃える（デスクトップと同じ）。
     上端基準＋px 微調整はフォント metrics 依存で実機でずれるため使わない（2026-11-22 佐藤・再修正） */
  align-items: baseline;
  padding: 11px 15px;
  color: var(--ink);
  transition: background 0.12s ease;
}
.record-link--simple {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 680px) {
  .record-link {
    grid-template-columns: 136px 112px minmax(0, 1fr);
    column-gap: 12px;
    align-items: baseline;
  }
  .record-list--search .record-link {
    grid-template-columns: 136px 176px minmax(0, 1fr);
  }
  .record-link--simple {
    grid-template-columns: minmax(0, 1fr);
  }
}
.record-link:hover {
  background: var(--accent-soft);
  text-decoration: none;
  color: var(--ink);
}

.record-date {
  grid-column: 1;
  /* 縦位置はグリッドのベースライン揃えに任せる。px の padding-top 微調整は
     フォントや文字拡大で崩れるので入れない */
  font-size: 0.84rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.record-cat {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.record-cat .badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-body {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
@media (min-width: 680px) {
  .record-body {
    grid-column: 3;
  }
  .record-link--simple .record-body {
    grid-column: 1;
  }
}

/* E8: 広い画面では薄字付随項目を独立カラム化し縦軸を揃える（モバイル・狭幅はインライン維持） */
@media (min-width: 900px) {
  .record-link:not(.record-link--simple) .record-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    column-gap: 16px;
    align-items: baseline;
  }
  .record-link:not(.record-link--simple) .record-title {
    grid-column: 1;
    min-width: 0;
  }
  .record-link:not(.record-link--simple) 
.record-sub {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .two-col .record-link:not(.record-link--simple) .record-body {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
  }
}
@media (min-width: 1060px) {
  .two-col .record-link:not(.record-link--simple) .record-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    column-gap: 12px;
    align-items: baseline;
  }
}

.record-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* 楽曲リストのバリエーション子行：
   ボタンは地味なグリフのみ。タイトルセルの左に全行共通のスロットを予約し、
   ボタンの有無でタイトルの開始位置がずれないようにする */
.song-table td.col-title { position: relative; padding-left: 30px; }
.sub-toggle {
  position: absolute;
  left: 4px;
  top: 11px;
  padding: 2px 4px;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.7em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.sub-toggle:hover { color: var(--ink-muted); }
.sub-toggle.is-open { transform: rotate(90deg); }
.song-sub-row { background: var(--seg-bg); }
.song-table .song-sub-row .song-sub-title { padding-left: 54px; }
/* カード表示（599px以下）の tr { display: flex } が hidden を打ち消すため明示する */
.song-sub-row[hidden] { display: none; }

.record-sub {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.cat-sub {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
  /* .badge と寸法だけでなく文字配置の仕組み（inline-flex の中央揃え）まで一致させる。
     block の行ボックス配置はフォント metrics 依存で、実機で .badge と縦位置がずれた（2026-11-22 佐藤） */
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-muted);
  white-space: nowrap;
}

.meta-url {
  overflow-wrap: anywhere;
}

.load-more-wrap {
  margin-top: 16px;
  text-align: center;
}

/* ---------- Tabs / Section Jump ---------- */

.jump-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.jump-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-sub);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}
.jump-tab:hover {
  background: var(--bg-hover);
  text-decoration: none;
}

/* ---------- Year Archive Strip ---------- */

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.year-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.year-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.year-num {
  font-size: 1.04rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.year-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Search Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 17, 21, 0.56);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 16px 24px;
}
.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: 100%;
  max-width: 680px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.modal-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  padding: 4px 2px;
}
.modal-input:focus {
  outline: none;
}

.modal-body {
  overflow-y: auto;
  padding: 8px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-sub);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.quick-item:hover {
  background: var(--accent-soft);
  text-decoration: none;
  color: var(--ink);
}
.quick-item-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.quick-item-title {
  font-weight: 600;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.quick-item-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ---------- Bar Meter (Top Songs) ---------- */

.bar-cell {
  min-width: 68px;
}
.bar-track {
  height: 6px;
  background: var(--bg-sub);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sub);
  padding-block: 24px 32px;
  font-size: 0.83rem;
  color: var(--ink-muted);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.empty-state {
  padding: 28px 18px;
  text-align: center;
  color: var(--ink-muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.ext-mark {
  font-size: 0.78em;
  margin-left: 3px;
  opacity: 0.78;
}

@media (max-width: 599px) {
  .container {
    padding-inline: 12px;
  }
  .header-top {
    gap: 6px;
  }
  .brand {
    gap: 5px;
  }
  .brand-mark {
    font-size: 1.15rem;
    letter-spacing: 0.04em;
  }
  .closed-badge {
    font-size: 0.62rem;
    letter-spacing: 0;
    padding: 1px 5px;
  }
  .header-actions {
    gap: 5px;
  }
  .icon-btn {
    padding: 5px 7px;
    font-size: 0.76rem;
  }
  .hero {
    padding: 18px 15px;
  }
  .search-form {
    flex-direction: column;
  }
  .data-table th,
  .data-table td {
    padding: 8px 9px;
    font-size: 0.85rem;
  }
  /* スマホ: ピルはカテゴリの横に並べる（トップ・運用リスト共通） */
  .record-cat {
    flex-direction: row;
    align-items: baseline;
    /* 横並びでは justify-content: center（縦積み時の指定）が主軸に効いて
       行ごとにピル群が中央寄せになり、ピルの始点が揃わなくなる。左端に固定する */
    justify-content: flex-start;
    gap: 6px;
  }
  .record-cat .cat-sub {
    margin-top: 0;
  }
  /* スマホ: 一覧テーブルは表→カード型（トップのレコードリストに寄せる） */
  .tl-table,
  .tl-table thead,
  .tl-table tbody {
    display: block;
  }
  /* スマホ: 並べ替えヘッダーはピルバー化（並べ替え可能な列だけ表示） */
  .tl-table thead tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--bg-sub);
    border-bottom: 1px solid var(--border);
  }
  .tl-table thead tr::before {
    content: '並べ替え';
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-muted);
    margin-right: 2px;
  }
  .tl-table thead th {
    display: none;
    background: none;
    border: none;
    padding: 0;
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
  }
  .tl-table thead th:has(> .th-sort-btn) {
    display: block;
  }
  .tl-table .th-sort-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 11px;
    background: var(--bg-elev);
    font-size: 0.78rem;
    font-weight: 600;
  }
  .tl-table .th-sort-btn.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
  }
  /* 並べ替えピルは意味で改行: 日付系（1行目）→ 件数系（2行目） */
  .tl-table thead th:has(> .th-sort-btn[data-sort-type="date"]) {
    order: 1;
  }
  .tl-table thead th:has(> .th-sort-btn[data-sort-type="num"]) {
    order: 3;
  }
  .tl-table thead tr:has(.th-sort-btn[data-sort-type="date"]):has(.th-sort-btn[data-sort-type="num"])::after {
    content: '';
    order: 2;
    flex-basis: 100%;
    height: 0;
  }
  .tl-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    padding: 11px 15px;
    border-bottom: 1px solid var(--border);
  }
  /* display: flex が hidden 属性を打ち消し、絞り込みが効かなくなるため明示する */
  .tl-table tbody tr[hidden] {
    display: none;
  }
  .tl-table tbody tr:last-child {
    border-bottom: none;
  }
  .tl-table tbody td {
    border: none;
    padding: 0;
    order: 3;
    min-width: 0;
  }
  .tl-table td.col-title {
    order: 1;
    flex: 1 1 auto;
    min-width: 45%;
    overflow-wrap: anywhere;
  }
  /* カード型では数値列の固定幅（56px）を解除する（ラベル＋値が収まらずはみ出すため） */
  .tl-table td.col-num {
    width: auto;
  }
  .tl-table td.col-title strong {
    font-size: 0.95rem;
  }
  .tl-table td.col-badge {
    order: 2;
    flex: 0 0 auto;
  }
  .tl-table td[data-label] {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex: 0 1 auto;
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .tl-table td[data-label]::before {
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--ink-muted);
  }
  .tl-table td.record-sub[data-label] {
    order: 4;
    flex: 1 1 100%;
    white-space: normal;
  }
  /* タイムライン一覧: 日付＋ピル → タイトル → 補足 */
  .tl-table--timeline td.col-date {
    order: 1;
    flex: 0 0 7.9rem;
    font-size: 0.84rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
  }
  .tl-table--timeline td.col-cat {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .tl-table--timeline td.col-cat .cat-sub {
    margin-top: 0;
  }
  .tl-table--timeline td.col-title {
    order: 3;
    flex: 1 1 55%;
    min-width: 0;
  }
  .tl-table--timeline td.record-sub {
    order: 4;
    flex: 0 1 auto;
  }
  .setlist-table tbody tr.is-conn-next td.setlist-num::after {
    top: calc(8px + 1.4em + 2px);
  }
  .setlist-table tbody tr.is-conn-prev td.setlist-num::before {
    height: 6px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .filter-panel,
  .jump-tabs,
  .modal-backdrop {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ---------- REVISION-2: Closed Edition Indicators & Full Property Display ---------- */

html[data-edition="closed"] .site-header {
  border-top: 3px solid #8c3b2b;
}

.closed-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #8c3b2b;
  color: #ffffff;
  white-space: nowrap;
}

[data-theme="dark"] .closed-badge {
  background: #c96551;
  color: #0f1115;
}

.record-id {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-left: 6px;
}

.mono-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.meta-row--audit .meta-key {
  color: var(--warn-fg);
  background: var(--warn-bg);
}

.prop-pre {
  white-space: pre-wrap;
  word-break: break-word;
}

/* トップ最上部の非公式表記（ヒーローの外） */
.site-notice {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* スマホ: 詳細ページの表をカード化（楽曲詳細の収録作品・演奏履歴） */
@media (max-width: 599px) {
  .data-table--cards,
  .data-table--cards thead,
  .data-table--cards tbody {
    display: block;
  }
  .data-table--cards thead:not(:has(.th-sort-btn)) {
    display: none;
  }
  .data-table--cards thead tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--bg-sub);
    border-bottom: 1px solid var(--border);
  }
  .data-table--cards thead tr::before {
    content: '並べ替え';
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-muted);
    margin-right: 2px;
  }
  .data-table--cards thead th {
    display: none;
    background: none;
    border: none;
    padding: 0;
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
  }
  .data-table--cards thead th:has(> .th-sort-btn) {
    display: block;
  }
  .data-table--cards tbody tr {
    display: block;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
  }
  .data-table--cards tbody tr:last-child {
    border-bottom: none;
  }
  .data-table--cards td {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 2px 0;
    border: none;
  }
  .data-table--cards td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 7.5em;
    white-space: nowrap;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ink-muted);
  }
  .data-table--cards td.col-main {
    display: block;
    padding: 0 0 4px;
    font-size: 1rem;
  }
}

/* メディア化の行き先は1件ずつ行分けする */
.media-dest {
  display: block;
}

/* 名義変遷 統合ページのメンバー表示（2026-11-22） */
.lineage-members {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* アーティストフィルターの派生サブピル（amazarashi 別名義系）: amazarashi ピルの直後にインライン表示 */
.pill-subrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pill-subrow[hidden] { display: none; }
.pill-subrow .pill-btn { font-size: 0.82rem; }

/* 主体詳細「関連タイムライン」のカテゴリ絞り込みで隠す行（era の hidden とは独立に効く） */
.tl-table tbody tr.tl-cat-hidden { display: none; }
.data-table tbody tr.tl-cat-hidden { display: none; }
[data-tl-filter] .pill-group { margin-bottom: 10px; }
