/* Give long static-card values and non-sortable details room to wrap clearly. */
[data-static-list] .character-card-value--detail,
[data-static-list] .character-card-value--long {
  display: block;
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}

[data-static-list] .character-card-value-label {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

@media (max-width: 850px) {
  [data-static-list] .character-card-value--detail,
  [data-static-list] .character-card-value--long {
    padding-right: 72px;
  }
}

/* Compact, scannable floor conditions for the Pain of the Forest route. */
#pain-forest .forest-phase-table-wrap {
  overflow-x: auto;
  border: 2px solid #f8d4e6;
  border-radius: 14px;
  background: #fff;
}

#pain-forest .forest-phase-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.5;
}

#pain-forest .forest-phase-table th,
#pain-forest .forest-phase-table td {
  padding: 10px;
  border-bottom: 1px solid #f7e3ed;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

#pain-forest .forest-phase-table caption {
  padding: 10px;
  color: var(--text-main);
  font-weight: 800;
  text-align: left;
}

#pain-forest .forest-phase-table thead th {
  background: #fff0f7;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
}

#pain-forest .forest-phase-table thead th:nth-child(1) { width: 11%; }
#pain-forest .forest-phase-table thead th:nth-child(2) { width: 39%; }
#pain-forest .forest-phase-table thead th:nth-child(3) { width: 29%; }
#pain-forest .forest-phase-table thead th:nth-child(4) { width: 21%; }

#pain-forest .forest-phase-table tbody th[scope="row"] {
  color: var(--accent);
  font-weight: 800;
}

#pain-forest .forest-phase-table tbody tr:last-child > * { border-bottom: 0; }

#pain-forest .forest-phase-list {
  margin: 0;
  padding-left: 1.15rem;
}

#pain-forest .forest-phase-list li + li { margin-top: 0.2rem; }
#pain-forest .forest-phase-table td::before { display: none; }

@media (max-width: 700px) {
  #pain-forest .forest-phase-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #pain-forest .forest-phase-table {
    min-width: 0;
    table-layout: auto;
  }

  #pain-forest .forest-phase-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #pain-forest .forest-phase-table tbody,
  #pain-forest .forest-phase-table tbody tr,
  #pain-forest .forest-phase-table tbody th,
  #pain-forest .forest-phase-table tbody td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  #pain-forest .forest-phase-table tbody tr {
    margin-bottom: 0.75rem;
    padding: 0.2rem 0.7rem 0.5rem;
    border: 1px solid #f8d4e6;
    border-radius: 12px;
    background: #fff;
  }

  #pain-forest .forest-phase-table tbody th[scope="row"] {
    padding: 0.6rem 0.1rem 0.45rem;
    border-bottom: 1px solid #f7e3ed;
  }

  #pain-forest .forest-phase-table tbody td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.55rem 0.1rem;
  }

  #pain-forest .forest-phase-table tbody td::before {
    display: block;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.4;
    content: attr(data-label);
  }

  #pain-forest .forest-phase-table tbody td:last-child { border-bottom: 0; }
}
