.work-toc {
  margin-block: 0.75rem;
}

.work-toc ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.6rem;
  border: 1px solid #f8d4e6;
  border-radius: 10px;
  background: #fff0f7;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-underline-offset: 0.15em;
}

.work-toc a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.work-overview [id]:target {
  scroll-margin-top: 0.75rem;
}

.work-overview .subpage-title > span,
.work-overview .page-link-card-title > span > span {
  display: inline-block;
}

.work-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.55rem 1rem;
  margin-block: 0.75rem;
}

.work-facts dt {
  font-weight: 700;
}

.work-facts dd {
  margin: 0;
}

.work-facts time,
.work-phrase {
  white-space: nowrap;
}

.work-steps {
  margin-block: 0.5rem 1rem;
  padding-inline-start: 1.5rem;
}

.character-table.evolution-table {
  min-width: 0;
}

.character-table.evolution-table th,
.character-table.evolution-table td {
  width: auto;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #f7e3ed;
  text-align: left;
  vertical-align: top;
}

.character-table.evolution-table th:first-child {
  width: 3.75rem;
  text-align: center;
  white-space: nowrap;
}

.evolution-table tbody th,
.character-table.evolution-table td {
  font-size: 0.92rem;
  line-height: 1.5;
}

.character-table.evolution-table td {
  font-weight: 400;
  word-break: normal;
  word-break: auto-phrase;
}

.evolution-table td span,
.evolution-table td small {
  white-space: nowrap;
}

.evolution-table td small {
  font-size: 0.875em;
}

.evolution-table tbody tr:nth-child(even) {
  background: #fffafc;
}

.character-profiles .character-table {
  min-width: 0;
}

.character-profiles .character-table th:nth-child(1),
.character-profiles .character-table td:nth-child(1):not([colspan]) {
  width: 38%;
}

.character-profiles .character-table th:nth-child(2),
.character-profiles .character-table td:nth-child(2) {
  width: 24%;
}

.work-character-search,
.work-character-filters {
  margin-block: 0.75rem;
}

.character-profiles .character-mobile-list-head,
.character-profiles .character-card-summary--with-value {
  grid-template-columns: minmax(0, 1fr) 6.5rem;
}

.character-card .character-toy {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 0.45rem;
  margin: 0.15rem 0.7rem 0.6rem;
  font-size: 0.85rem;
}

.character-card .character-toy > span:first-child {
  font-weight: 700;
}

.character-toy-name {
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

.character-profiles .character-detail-item:first-child {
  grid-column: 1 / -1;
  grid-template-columns: max-content minmax(0, 1fr);
}

.character-profiles .character-detail-item p {
  word-break: normal;
  word-break: auto-phrase;
}

.profile-value-part {
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .character-profiles .character-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .character-profiles .character-detail-item {
    grid-template-columns: 5.25rem minmax(0, 1fr);
  }
}

@media (max-width: 850px) {
  .character-profiles .character-detail-item:first-child {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .work-toc ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-facts {
    column-gap: 0.65rem;
  }

  .character-table.evolution-table th,
  .character-table.evolution-table td {
    padding-inline: 0.35rem;
  }

  .character-table.evolution-table th:first-child {
    width: 2.6rem;
  }
}
