.work-edition {
  white-space: nowrap;
}

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

.work-toc ul {
  display: grid;
  grid-template-columns: repeat(3, 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;
}

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

.character-profiles .character-table th:last-child {
  padding-inline-start: 0.65rem;
}

.character-profiles .character-card-value {
  word-break: keep-all;
  overflow-wrap: normal;
}

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

.work-facts dd,
.work-customization dd {
  margin: 0 0 0.65rem;
}

.work-facts dd:last-child,
.work-customization dd:last-child {
  margin-bottom: 0;
}

.work-mini-games h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.work-mini-games p {
  margin: 0;
}

.work-mini-games section + section {
  border-top: 1px solid #f7e3ed;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

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

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

@media (max-width: 360px) {
  .work-toc a {
    padding-inline: 0.3rem;
    font-size: 0.85rem;
  }

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