/* Palworld 固有の一覧レイアウト調整 */
.pal-table {
  min-width: 0;
  table-layout: fixed;
}

.pal-table th:nth-child(1),
.pal-table td:nth-child(1) {
  width: 10%;
}

.pal-table th:nth-child(2),
.pal-table td:nth-child(2) {
  width: 22%;
}

.pal-table th:nth-child(3),
.pal-table td:nth-child(3) {
  width: 20%;
}

.pal-table th:nth-child(4),
.pal-table td:nth-child(4) {
  width: 48%;
}

.approved-list-table {
  min-width: 720px;
}

body[data-page="breeding"] .approved-list-table th:nth-child(1),
body[data-page="breeding"] .approved-list-table td:nth-child(1) {
  width: 12%;
}

body[data-page="breeding"] .approved-list-table th:nth-child(2),
body[data-page="breeding"] .approved-list-table td:nth-child(2) {
  width: 36%;
}

body[data-page="breeding"] .approved-list-table th:nth-child(3),
body[data-page="breeding"] .approved-list-table td:nth-child(3) {
  width: 22%;
}

body[data-page="breeding"] .approved-list-table th:nth-child(4),
body[data-page="breeding"] .approved-list-table td:nth-child(4) {
  width: 30%;
}

body[data-page="passives"] .approved-list-table th:nth-child(1),
body[data-page="passives"] .approved-list-table td:nth-child(1) {
  width: 72%;
}

body[data-page="passives"] .approved-list-table th:nth-child(2),
body[data-page="passives"] .approved-list-table td:nth-child(2) {
  width: 28%;
}

body[data-page="technologies"] .approved-list-table th:nth-child(1),
body[data-page="technologies"] .approved-list-table td:nth-child(1),
body[data-page="structures"] .approved-list-table th:nth-child(1),
body[data-page="structures"] .approved-list-table td:nth-child(1) {
  width: 18%;
}

body[data-page="technologies"] .approved-list-table th:nth-child(2),
body[data-page="technologies"] .approved-list-table td:nth-child(2),
body[data-page="structures"] .approved-list-table th:nth-child(2),
body[data-page="structures"] .approved-list-table td:nth-child(2) {
  width: 82%;
}

body[data-page="bosses"] .approved-list-table th:nth-child(1),
body[data-page="bosses"] .approved-list-table td:nth-child(1) {
  width: 62%;
}

body[data-page="bosses"] .approved-list-table th:nth-child(2),
body[data-page="bosses"] .approved-list-table td:nth-child(2) {
  width: 38%;
}

.breeding-combo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body[data-page="breeding"] .character-detail,
body[data-page="passives"] .character-detail,
body[data-page="technologies"] .character-detail,
body[data-page="structures"] .character-detail,
body[data-page="bosses"] .character-detail,
body[data-page="breeding"] .character-detail-item {
  grid-template-columns: minmax(0, 1fr);
}

body[data-page="breeding"] .character-detail-item h3 {
  white-space: normal;
}

body[data-page="passives"] .character-detail-item,
body[data-page="technologies"] .character-detail-item,
body[data-page="structures"] .character-detail-item,
body[data-page="bosses"] .character-detail-item {
  grid-template-columns: 11rem minmax(0, 1fr);
}

body[data-page="passives"] .character-detail-item h3,
body[data-page="technologies"] .character-detail-item h3,
body[data-page="structures"] .character-detail-item h3,
body[data-page="bosses"] .character-detail-item h3 {
  white-space: normal;
}

.breeding-combo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #f4d9e7;
  border-radius: 8px;
  background: #fffafc;
  color: var(--text-main);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}

.breeding-combo-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 850px) {
  .approved-card-summary {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  }

  .approved-card-summary .character-name-button {
    width: 100%;
    justify-content: space-between;
  }

  .approved-card-summary .pal-card-number,
  .approved-card-summary .pal-card-value {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px;
    align-items: center;
  }

  .approved-card-label {
    color: var(--brand);
    font-size: 0.65rem;
    font-weight: 900;
    white-space: nowrap;
  }

  body[data-page="passives"] .character-detail-item,
  body[data-page="technologies"] .character-detail-item,
  body[data-page="structures"] .character-detail-item,
  body[data-page="bosses"] .character-detail-item {
    grid-template-columns: 8.5rem minmax(0, 1fr);
  }

  .breeding-combo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
