/* Compact reference tables for the Suika Game work pages. */
.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;
}

.character-table.info-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  overflow-wrap: break-word;
}

.character-table.info-table th,
.character-table.info-table td {
  width: auto;
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

.character-table.info-table thead th:first-child {
  width: 36%;
}

.character-table.info-table tbody th,
.character-table.info-table tbody td {
  border-bottom: 1px solid #f7e3ed;
  font-size: 0.92rem;
  line-height: 1.5;
}

.character-table.info-table tbody td {
  font-weight: 400;
  word-break: normal;
}

.info-table tbody th {
  color: inherit;
  background: transparent;
}

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

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

.character-profiles .character-mobile-group-heading {
  align-self: center;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.character-profiles .character-detail-item:first-child {
  grid-column: 1 / -1;
}

@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));
  }

  .character-table.info-table th,
  .character-table.info-table td {
    padding-inline: 0.45rem;
  }

  .character-table.info-table thead th:first-child {
    width: 41%;
  }
}
