/* デレステ作品トップ統合ページ専用スタイル */
body[data-page="integrated"] .layout-shell {
  max-width: 1280px;
  margin-top: 0;
}

body[data-page="integrated"] .main-content {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 2px;
  padding-bottom: 28px;
}

body[data-page="integrated"] .page-affiliate-note {
  display: none;
}

.consolidated-hero {
  position: relative;
  margin: 0 0 18px;
  padding-top: 6px;
  scroll-margin-top: 18px;
}

.consolidated-hero-top,
.integrated-section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.consolidated-hero .page-updated-at,
.integrated-section-top .page-updated-at {
  position: static;
  flex: 0 0 auto;
  margin: 0;
  text-align: right;
}

.consolidated-hero h1 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.consolidated-hero-copy,
.integrated-section-copy {
  max-width: 48rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.integrated-toc {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.integrated-toc a {
  display: grid;
  gap: 3px;
  min-height: 70px;
  padding: 12px 10px;
  border: 2px solid var(--brand-light);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  color: var(--accent);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(47, 139, 216, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.integrated-toc a:hover,
.integrated-toc a:focus-visible {
  border-color: var(--brand);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(47, 139, 216, 0.14);
}

.integrated-toc small {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.integrated-section {
  scroll-margin-top: 16px;
  margin-bottom: 32px;
}

.integrated-section:last-of-type {
  margin-bottom: 6px;
}

.integrated-section-heading {
  margin-bottom: 10px;
}

.integrated-section-heading h2 {
  margin: 0;
  color: var(--brand);
  font-size: 1.35rem;
  line-height: 1.25;
}

.integrated-section-heading h2::before {
  content: "★";
  margin-right: 8px;
  color: #f0b84f;
  font-size: 1.05rem;
}

.integrated-section-heading p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.integrated-section .panel {
  margin-bottom: 12px;
}

.integrated-section .panel h3 {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 1rem;
}

.integrated-section .filter-controls {
  flex-wrap: wrap;
}

.integrated-section input[type="search"] {
  min-width: 0;
  padding: 9px 12px;
  border: 2px solid var(--brand-light);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-main);
  font: inherit;
  font-weight: 700;
  outline: none;
}

.integrated-section input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 139, 216, 0.2);
}

.integrated-section .char-table,
.integrated-section .creators-table-wrap,
.integrated-section .notes-table-wrap {
  min-width: 0;
}

.static-detail-row[hidden] {
  display: none;
}

/* 声優・ユニット一覧 */
.creators-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.creators-search-box {
  display: grid;
  gap: 0;
  width: 100%;
}

.creators-search-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  z-index: 1;
}

.creators-search-tab,
.creators-role-tab,
.creators-sort-button,
.creators-mobile-sort-button,
.creators-title-button,
.notes-mobile-sort-button {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.creators-search-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 6px;
  border: 2px solid var(--brand-light);
  border-radius: 12px 12px 0 0;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.2;
}

.creators-search-tab + .creators-search-tab {
  margin-left: -2px;
}

.creators-search-tab.is-active {
  position: relative;
  z-index: 2;
  border-color: var(--brand);
  background: linear-gradient(135deg, #eef7ff 0%, #e5f2ff 100%);
}

.creators-search {
  width: 100%;
  min-width: 0;
  margin-top: -2px;
  padding: 8px 12px;
  border: 2px solid var(--brand-light);
  border-radius: 0 0 12px 12px;
  background: #fff;
  color: var(--text-main);
  font: inherit;
}

.creators-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(47, 139, 216, 0.12);
}

.creators-filter-label {
  margin: 0 0 7px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.creators-role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.creators-role-tab,
.creators-mobile-sort-button {
  padding: 8px 12px;
  border: 2px solid var(--brand-light);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.creators-role-tab.is-active,
.creators-role-tab:hover,
.creators-role-tab:focus-visible,
.creators-mobile-sort-button.is-active {
  border-color: var(--brand);
  background: #eef7ff;
  outline: none;
}

.creators-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--rule-line);
  border-radius: 10px;
}

.creators-table th,
.creators-table td {
  padding: 9px 10px;
  border-bottom: 1px dashed var(--rule-line);
  vertical-align: middle;
  text-align: left;
}

.creators-table tr:last-child td {
  border-bottom: 0;
}

.creators-table th {
  background: rgba(238, 247, 255, 0.75);
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.creators-table th:last-child,
.creators-table td:last-child {
  width: 5rem;
  text-align: right;
}

.creators-sort-button {
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

.creators-sort-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.creators-sort-icon {
  margin-left: 3px;
  color: var(--accent);
}

.creators-title-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  text-align: left;
}

.creators-title-button:hover,
.creators-title-button:focus-visible {
  text-decoration: underline;
  outline: none;
}

.creators-title-button-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.creators-title-button-icon {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 0.76rem;
}

.creators-roles-cell {
  min-width: 10rem;
}

.creators-role-pill,
.notes-attribute-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px 4px 2px 0;
  padding: 3px 7px;
  border: 1px solid var(--brand-light);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.creators-detail-cell {
  padding: 0 !important;
  background: rgba(238, 247, 255, 0.45);
}

.creators-detail {
  display: grid;
  gap: 7px;
  padding: 10px 12px 12px;
}

.creators-song-item {
  padding: 7px 9px;
  border-left: 3px solid var(--brand-light);
  background: rgba(255, 255, 255, 0.72);
}

.creators-song-title,
.creators-song-singer {
  margin: 0;
}

.creators-song-title {
  color: var(--text-main);
  font-weight: 800;
}

.creators-song-singer {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.creators-empty,
.notes-empty {
  margin: 0;
  color: var(--text-muted);
}

.creators-cards {
  display: grid;
  gap: 8px;
}

.creators-mobile-list-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.creators-mobile-list-head .creators-mobile-sort-button {
  flex: 1 1 0;
}

.creators-card {
  border: 1px solid var(--rule-line);
  border-radius: 10px;
  overflow: hidden;
}

.creators-card-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
}

.creators-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.creators-card-title {
  margin: 0 0 3px;
  font-size: 0.98rem;
}

.creators-card-count {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 900;
}

/* ノーツ一覧 */
.notes-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.notes-search-box {
  display: grid;
  gap: 0;
  width: 100%;
}

.notes-search-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  z-index: 1;
}

.notes-search-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 6px;
  border: 2px solid var(--brand-light);
  border-radius: 12px 12px 0 0;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.notes-search-tab + .notes-search-tab {
  margin-left: -2px;
}

.notes-search-tab.is-active {
  position: relative;
  z-index: 2;
  border-color: var(--brand);
  background: linear-gradient(135deg, #eef7ff 0%, #e5f2ff 100%);
}

.notes-search {
  width: 100%;
  min-width: 0;
  margin-top: -2px;
  padding: 8px 12px;
  border: 2px solid var(--brand-light);
  border-radius: 0 0 12px 12px;
  background: #fff;
  color: var(--text-main);
  font: inherit;
}

.notes-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(47, 139, 216, 0.12);
}

.notes-filter-group + .notes-filter-group {
  margin-top: 8px;
}

.notes-filter-label {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.notes-filter-toggle {
  display: none;
}

.notes-filter-body {
  display: block;
}

.notes-tabs,
.notes-mobile-difficulty-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notes-tab,
.notes-mobile-difficulty-tab {
  appearance: none;
  padding: 9px 12px;
  border: 2px solid var(--brand-light);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.notes-tab.is-active,
.notes-tab:hover,
.notes-tab:focus-visible,
.notes-mobile-difficulty-tab.is-active,
.notes-mobile-difficulty-tab:hover,
.notes-mobile-difficulty-tab:focus-visible {
  border-color: var(--brand);
  background: #eef7ff;
  outline: none;
}

.notes-tab[data-attribute-style="cute"],
.notes-attribute-pill[data-attribute-style="cute"] {
  border-color: #79b0f2;
  background: #dfeeff;
  color: #2f69bf;
}

.notes-tab[data-attribute-style="cool"],
.notes-attribute-pill[data-attribute-style="cool"] {
  border-color: #efc248;
  background: #fff2bf;
  color: #b88400;
}

.notes-tab[data-attribute-style="passion"],
.notes-attribute-pill[data-attribute-style="passion"] {
  border-color: #7fc18b;
  background: #dff1e3;
  color: #31824f;
}

.notes-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--rule-line);
  border-radius: 10px;
  overflow: hidden;
  table-layout: fixed;
}

.notes-table th,
.notes-table td {
  padding: 8px 6px;
  border-bottom: 1px dashed var(--rule-line);
  vertical-align: middle;
}

.notes-table th {
  background: rgba(238, 247, 255, 0.75);
  color: var(--text-muted);
  font-size: 0.76rem;
  text-align: center;
}

.notes-table td {
  font-size: 0.82rem;
  text-align: center;
}

.notes-table tr:last-child td {
  border-bottom: 0;
}

.notes-table th:first-child,
.notes-table td:first-child {
  width: 30%;
  text-align: left;
}

.notes-sort-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.notes-sort-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.notes-mobile-sort-button {
  padding: 8px 12px;
  border: 2px solid var(--brand-light);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.notes-mobile-sort-button:hover,
.notes-mobile-sort-button:focus-visible,
.notes-mobile-sort-button.is-active {
  border-color: var(--brand);
  background: #eef7ff;
  outline: none;
}

.notes-title-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.notes-title-button:hover,
.notes-title-button:focus-visible {
  text-decoration: underline;
  outline: none;
}

.notes-title-button-text,
.notes-title-main {
  overflow-wrap: anywhere;
}

.notes-title-button-icon {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 0.72rem;
}

.notes-value-cell {
  font-variant-numeric: tabular-nums;
}

.notes-variable-cell {
  padding: 0 !important;
  background: rgba(238, 247, 255, 0.45);
}

.notes-record-detail {
  padding: 10px 12px 12px;
}

.notes-credit-list {
  display: grid;
  grid-template-columns: minmax(4rem, auto) minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
}

.notes-credit-item {
  display: contents;
}

.notes-credit-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.notes-credit-value {
  min-width: 0;
  margin: 0;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.notes-attribute-pill[data-attribute-style="all-attribute"] {
  border-color: var(--brand-light);
  background: #fff;
  color: var(--accent);
}

.notes-cards {
  display: grid;
  gap: 8px;
}

.notes-mobile-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notes-mobile-list-head-side {
  display: flex;
  gap: 6px;
}

.notes-mobile-sort-button {
  flex: 1 1 auto;
  min-width: 0;
}

.notes-mobile-list-head-side .notes-mobile-sort-button {
  flex: 0 1 auto;
}

.notes-card {
  border: 1px solid var(--rule-line);
  border-radius: 10px;
  overflow: hidden;
}

.notes-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
}

.notes-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.notes-card-title {
  margin: 0;
  font-size: 0.95rem;
}

.notes-card-side {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 3px;
}

.notes-card-value {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 850px) {
  body[data-page="integrated"] .page-affiliate-note {
    display: block;
  }

  body[data-page="integrated"] .main-content {
    padding: 6px 4px 8px;
  }

  .consolidated-hero {
    padding: 6px 4px 0;
  }

  .consolidated-hero-top,
  .integrated-section-top {
    align-items: flex-start;
  }

  .consolidated-hero h1 {
    font-size: 1.55rem;
  }

  .consolidated-hero-copy,
  .integrated-section-copy {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .integrated-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0 4px 12px;
  }

  .integrated-toc a {
    min-height: 58px;
    padding: 9px 7px;
    font-size: 0.86rem;
  }

  .integrated-toc small {
    font-size: 0.7rem;
  }

  .integrated-section {
    margin-bottom: 18px;
  }

  .integrated-section-heading {
    padding-inline: 4px;
  }

  .integrated-section-heading h2 {
    font-size: 1.13rem;
  }

  .integrated-section-heading p {
    font-size: 0.82rem;
  }

  .integrated-section .panel {
    padding: 8px 6px;
    margin-bottom: 4px;
  }

  .integrated-section .filter-controls {
    gap: 6px;
  }

  .integrated-section .filter-controls input[type="search"] {
    flex: 1 1 100%;
  }

  .creators-role-tabs,
  .notes-tabs,
  .notes-mobile-difficulty-tabs {
    gap: 6px;
  }

  .creators-role-tab,
  .notes-tab,
  .notes-mobile-difficulty-tab {
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .creators-table {
    display: none;
  }

  .notes-table {
    display: none;
  }

  .notes-filter-group[data-filter-panel="difficulty"] {
    display: block;
  }

  .notes-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border: 2px solid var(--brand-light);
    border-radius: 10px;
    background: #fff;
    color: var(--accent);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .notes-filter-toggle-icon {
    transition: transform 0.18s ease;
  }

  .notes-filter-group.is-open .notes-filter-toggle-icon {
    transform: rotate(180deg);
  }

  .notes-filter-body {
    display: none;
    padding-top: 7px;
  }

  .notes-filter-group.is-open .notes-filter-body {
    display: block;
  }

  .notes-filter-group[data-filter-panel="attribute"] .notes-filter-body {
    display: block;
  }

  .notes-filter-group[data-filter-panel="attribute"] .notes-filter-label {
    display: none;
  }

  .notes-filter-group[data-filter-panel="difficulty"] .notes-filter-label {
    display: none;
  }

  .notes-mobile-list-head {
    gap: 6px;
  }

  .notes-mobile-sort-button {
    padding: 7px 8px;
    font-size: 0.75rem;
  }

  .notes-mobile-list-head-side {
    flex: 1 1 auto;
  }

  .notes-card-row {
    padding: 8px;
  }
}

@media (max-width: 520px) {
  .consolidated-hero-top,
  .integrated-section-top {
    gap: 7px;
  }

  .consolidated-hero .page-updated-at,
  .integrated-section-top .page-updated-at {
    font-size: 0.53rem;
  }

  .creators-card-row {
    padding: 8px;
  }
}

@media (min-width: 851px) {
  .creators-cards,
  .notes-cards {
    display: none;
  }
}
