body[data-summary-page] .layout-shell {
  max-width: 1280px;
  margin-top: 0;
}

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

body[data-summary-page] .site-intro {
  margin-top: 0;
  padding-top: 0;
}

body[data-summary-page] .site-intro .subpage-title {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1.2;
  text-align: left;
}

body[data-summary-page] .site-intro-copy {
  max-width: none;
  margin: 0;
  text-align: left;
}

body[data-summary-page] .site-intro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 8px;
}

body[data-summary-page] .site-intro-top .page-updated-at {
  position: static;
  flex: 0 0 auto;
  text-align: right;
}

.summary-overview {
  margin: 0 0 18px;
}

.summary-overview p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.summary-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.summary-nav-card {
  display: block;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.summary-nav-card:hover,
.summary-nav-card:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.summary-nav-card-title {
  display: block;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.35;
}

.summary-nav-card-text {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.summary-section {
  scroll-margin-top: 12px;
  margin-bottom: 26px;
}

.summary-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 7px;
}

.summary-section-heading h2 {
  min-width: 0;
  margin: 0;
  color: var(--accent);
  font-size: 1.22rem;
  line-height: 1.35;
}

.summary-section-heading h2::before {
  content: "✦";
  display: inline-block;
  margin-right: 7px;
  color: var(--accent);
  font-size: 0.86em;
}

.summary-count {
  color: var(--text-muted);
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.summary-section-description {
  margin: 0 0 9px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.summary-section .character-search-panel,
.summary-section .character-filter-panel {
  margin-bottom: 8px;
}

.summary-section .character-list-panel {
  margin-bottom: 0;
}

.summary-related-links {
  margin-top: 0;
}

@media (max-width: 900px) {
  .summary-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body[data-summary-page] .main-content {
    padding: 6px 8px 8px;
  }

  body[data-summary-page] .layout-shell,
  body[data-summary-page] .main-content,
  body[data-summary-page] .panel,
  body[data-summary-page] .mobile-ad-slot,
  body[data-summary-page] .sp-ad-viewport,
  body[data-summary-page] .sp-ad-card,
  body[data-summary-page] .character-list,
  body[data-summary-page] .character-card {
    max-width: 100%;
    min-width: 0;
  }

  body[data-summary-page] .site-intro-top {
    align-items: flex-start;
    margin-bottom: 6px;
  }

  .summary-nav-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .summary-nav-card {
    padding: 10px 12px;
  }

  .summary-section {
    margin-bottom: 22px;
  }

  .summary-section-heading {
    align-items: flex-start;
    gap: 6px;
  }

  .summary-section-heading h2 {
    font-size: 1.1rem;
  }

  body[data-summary-page] .character-card-meta > span {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
