.ac04-list-table {
  min-width: 0;
}

.ac04-list-table th:nth-child(n),
.ac04-list-table td:nth-child(n) {
  width: auto;
  overflow-wrap: anywhere;
}

#missions .ac04-list-table th:nth-child(1) { width: 26%; }
#missions .ac04-list-table th:nth-child(2) { width: 9%; }
#missions .ac04-list-table th:nth-child(3) { width: 25%; }
#named-aces .ac04-list-table th:nth-child(1) { width: 20%; }
#named-aces .ac04-list-table th:nth-child(2) { width: 26%; }
#named-aces .ac04-list-table th:nth-child(3) { width: 16%; }
#aircraft .ac04-list-table th:nth-child(1) { width: 22%; }
#aircraft .ac04-list-table th:nth-child(2) { width: 23%; }
#aircraft .ac04-list-table th:nth-child(3) { width: 15%; }
#weapons .ac04-list-table th:nth-child(1) { width: 13%; }
#weapons .ac04-list-table th:nth-child(2) { width: 34%; }
#weapons .ac04-list-table th:nth-child(3) { width: 16%; }
#soundtrack .ac04-list-table th:nth-child(2),
#soundtrack .ac04-list-table th:nth-child(3),
#soundtrack .ac04-list-table th:nth-child(4) { width: 13%; }
#soundtrack .ac04-list-table th:nth-child(5) { width: 28%; }

.ac04-card-values {
  display: grid;
  gap: .3rem;
  margin: .4rem .65rem 0;
}

.ac04-card-values > div {
  display: grid;
  grid-template-columns: minmax(5.5em, 30%) minmax(0, 1fr);
  gap: .5rem;
}

.ac04-card-values dt {
  color: var(--brand);
  font-size: .8em;
  font-weight: 700;
}

.ac04-card-values dd {
  margin: 0;
}

#soundtrack .character-card-name {
  overflow-wrap: anywhere;
}

[data-static-list] .static-mobile .character-card-head {
  padding-inline: .65rem;
}

[data-static-section] a {
  color: var(--brand);
  text-underline-offset: .15em;
}

#world .work-facts {
  grid-template-columns: minmax(8em, max-content) minmax(0, 1fr);
}

#soundtrack .work-facts,
#world .work-facts,
#controls ol,
.character-detail-item ul {
  margin-bottom: .75rem;
}

.character-detail-item ul {
  padding-inline-start: 1.3em;
  margin-top: 0;
}

.ace-input-table tbody th {
  background: transparent;
}

#world .ace-input-table tbody th {
  white-space: nowrap;
}

.ac04-rank-table th:nth-child(2),
.ac04-rank-table th:nth-child(3) {
  white-space: nowrap;
}

.ac04-rank-table td:nth-child(2),
.ac04-rank-table td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ac04-trial-table td:nth-child(2) {
  white-space: nowrap;
}

@media (width > 600px) {
  .ac04-rank-table th:first-child {
    width: 21%;
  }

  .ac04-trial-table th:first-child {
    width: 28%;
  }
}

@media (max-width: 600px) {
  #world .work-facts,
  #soundtrack .work-facts,
  #unlocks .work-facts {
    grid-template-columns: minmax(0, 1fr);
    row-gap: .15rem;
  }

  #world .work-facts dd,
  #soundtrack .work-facts dd,
  #unlocks .work-facts dd {
    margin-bottom: .55rem;
  }

  :is(.ac04-rank-table, .ac04-trial-table) {
    display: block;
  }

  :is(.ac04-rank-table, .ac04-trial-table) :is(thead, tbody) {
    display: block;
  }

  :is(.ac04-rank-table, .ac04-trial-table) tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, 4.6rem);
  }

  .ac04-trial-table tr {
    grid-template-columns: minmax(0, 1fr) 6rem;
  }

  #missions .character-detail-item,
  #aircraft .character-detail-item:has(> ul) {
    grid-template-columns: minmax(0, 1fr);
    gap: .25rem;
  }

  :is(.ac04-rank-table, .ac04-trial-table) :is(th, td) {
    padding: .5rem .55rem;
  }

  :is(.ac04-rank-table, .ac04-trial-table) thead th:last-child {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    padding: 0;
    border: 0;
  }

  :is(.ac04-rank-table, .ac04-trial-table) tbody tr > * {
    border-bottom: 0;
  }

  :is(.ac04-rank-table, .ac04-trial-table) tbody td:last-child {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--brand-light);
    padding-block: 0 .65rem;
    font-size: .94rem;
    line-height: 1.55;
  }
}
