body[data-page="home"] .layout-shell {
  max-width: 1280px;
  margin-top: 12px;
}

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

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

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.home-description {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  text-align: center;
}

.home-card {
  display: grid;
  gap: 8px;
  padding: 18px 16px;
  border: 2px solid var(--brand-light);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff9fc 0%, #fff 100%);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 16px rgba(244, 114, 182, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-card:hover,
.home-card:focus-visible {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(244, 114, 182, 0.12);
  outline: none;
}

.home-card-title {
  margin: 0;
  color: var(--accent);
  font-size: 1.18rem;
  line-height: 1.25;
}

.home-card-text {
  margin: 0;
  color: var(--text-main);
  font-size: 0.94rem;
  line-height: 1.45;
}

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

@media (max-width: 520px) {
  body[data-page="home"] .main-content {
    padding: 6px 8px 8px;
  }

  .home-card {
    padding: 14px 12px;
  }

  .home-card-title {
    font-size: 1.08rem;
  }
}

body[data-rendering="static"] .layout-shell {
  max-width: 1280px;
  margin-top: 0;
}

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

body[data-rendering="static"] .site-intro {
  margin-top: 0;
  padding-top: 0;
}

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

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

.site-intro-links {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.site-intro-top .subpage-back-link { margin: 0; }

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

.static-toc ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.25rem;
}

[data-static-list] { margin-top: 22px; }

[data-static-list] > h2 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 1.22rem;
}

.static-section-description {
  margin: 0 0 10px;
  color: var(--text-muted);
  line-height: 1.6;
}

[data-static-list] .character-card-meta {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

#endings .character-table--scoped th:nth-child(1),
#endings .character-table--scoped td:nth-child(1) { width: 24%; }
#endings .character-table--scoped th:nth-child(2),
#endings .character-table--scoped td:nth-child(2) { width: 16%; }
#endings .character-table--scoped th:nth-child(3),
#endings .character-table--scoped td:nth-child(3) { width: 20%; }
#endings .character-table--scoped th:nth-child(4),
#endings .character-table--scoped td:nth-child(4) { width: 40%; }

#hakoniwa-voices .character-table--scoped th:nth-child(1),
#hakoniwa-voices .character-table--scoped td:nth-child(1) { width: 21%; }
#hakoniwa-voices .character-table--scoped th:nth-child(2),
#hakoniwa-voices .character-table--scoped td:nth-child(2) { width: 17%; }
#hakoniwa-voices .character-table--scoped th:nth-child(3),
#hakoniwa-voices .character-table--scoped td:nth-child(3) { width: 27%; }
#hakoniwa-voices .character-table--scoped th:nth-child(4),
#hakoniwa-voices .character-table--scoped td:nth-child(4) { width: 35%; }

#event-cg .character-table--scoped th:nth-child(1),
#event-cg .character-table--scoped td:nth-child(1) { width: 22%; }
#event-cg .character-table--scoped th:nth-child(2),
#event-cg .character-table--scoped td:nth-child(2) { width: 20%; }
#event-cg .character-table--scoped th:nth-child(3),
#event-cg .character-table--scoped td:nth-child(3) { width: 20%; }
#event-cg .character-table--scoped th:nth-child(4),
#event-cg .character-table--scoped td:nth-child(4) { width: 38%; }

@media (max-width: 600px) {
  #event-cg .character-card-summary--with-value {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  body[data-rendering="static"] .main-content { padding: 6px 8px 8px; }

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

  .site-intro-top {
    align-items: flex-start;
    margin-bottom: 6px;
  }

  .site-intro-links { gap: 6px; }
}
