/* The original table/card layout is shared; these rules only support static twins. */
body[data-rendering="static"] [hidden] { display: none !important; }
[data-static-list] { min-width: 0; scroll-margin-top: 1rem; }
[data-static-list] .static-mobile { display: none; }
[data-static-list] .character-card-value { white-space: normal; overflow-wrap: anywhere; }
[data-static-list] [data-static-count] { font-size: .8rem; text-align: right; margin: .5rem 0; }
[data-static-list] [data-static-reset] { font: inherit; cursor: pointer; }
[data-static-list] button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-static-list] .character-detail { padding: 10px; }
@media (max-width: 850px) {
  [data-static-list] .character-mobile-sort-button { white-space: nowrap; padding-inline: 2px; }
  [data-static-list] .static-desktop { display: none; }
  [data-static-list] .static-mobile { display: block; }
}

body[data-rendering="static"] .static-page-kind { display: inline-block; }

/* Keep detail labels and long values in separate, naturally wrapping cells. */
[data-static-list] .info-detail { align-items: start; }
[data-static-list] .info-detail-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
[data-static-list] .info-detail-item h3 { white-space: normal; overflow-wrap: anywhere; }
#materials .info-detail-item--wide { grid-template-columns: 8.2rem minmax(0, 1fr); }
@media (min-width: 851px) and (max-width: 1000px) {
  [data-static-list] .character-sort-button { font-size: .75rem; gap: 4px; }
  [data-static-list] .character-sort-button > span:first-child { white-space: nowrap; }
}
@media (max-width: 850px) {
  #characters .static-mobile .character-name-button { gap: 4px; }
  #characters .static-mobile .character-mobile-sort-button { padding-inline: 2px; white-space: nowrap; }
  #materials .static-mobile .info-card-summary--materials > :nth-child(1),
  #materials .static-mobile .character-mobile-list-head > :nth-child(1) { grid-column: span 3; }
  #materials .static-mobile .info-card-summary--materials > :nth-child(3),
  #materials .static-mobile .character-mobile-list-head > :nth-child(3) { grid-column: span 2; }
  #materials .static-mobile .info-card-summary--materials > :nth-child(n+4),
  #materials .static-mobile .character-mobile-list-head > :nth-child(n+4) { grid-column: span 3; }
  #materials .static-mobile .info-card-summary--materials > :nth-child(n+4) { justify-content: start; border-radius: 6px; }
  #materials .static-mobile .info-card-summary--materials > :nth-child(4)::before { content: "特産："; flex-shrink: 0; }
  #materials .static-mobile .info-card-summary--materials > :nth-child(5)::before { content: "天賦本："; flex-shrink: 0; }
  #materials .static-mobile .info-detail-item--wide { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
