/* Content-specific layout must not inherit the equipment thumbnail column.
   Existing native controls, art, translations and progression handlers stay
   in place; only their available space and visual grouping change. */
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list {
  display:grid; grid-template-columns:minmax(0,1fr); gap:12px;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list > .equipment-row {
  display:grid; grid-template-columns:minmax(0,1fr); gap:10px;
  min-width:0; margin:0; padding:12px;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list > .equipment-row > * {
  grid-column:1; min-width:0; max-width:100%;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-heading-v20 {
  display:grid; grid-template-columns:62px minmax(0,1fr);
  align-items:center; gap:12px; min-width:0;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-heading-v20 > div {
  min-width:0;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-heading-v20 h3 {
  margin:0 0 6px; line-height:1.35;
  overflow-wrap:normal; word-break:keep-all;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list .growth-confirm {
  display:grid; grid-template-columns:minmax(0,1fr) auto;
  align-items:center; gap:12px; margin:0; padding:10px;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list .growth-confirm > span {
  min-width:0; max-width:100%;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list .growth-confirm > .dialog-button {
  min-width:64px; min-height:44px; white-space:nowrap;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list .growth-confirm small {
  overflow-wrap:normal; word-break:keep-all; line-height:1.4;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list .dialog-action-row {
  margin:0; min-width:0;
}
body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list .dialog-action-row > .dialog-button {
  width:100%; min-width:44px; min-height:44px;
  white-space:normal; overflow-wrap:normal; word-break:keep-all;
}

/* Keep complete emblem/caption pairs together at their intrinsic width.
   A 140px flex basis previously stretched every short trait to its own row,
   leaving a tall, mostly empty panel to the right of each portrait. */
body #detail-dialog#detail-dialog .recruit-heading-v20 .visual-character-meta-v20,
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .visual-character-meta-v20 {
  display:flex; align-items:flex-start; width:100%; max-width:100%; gap:4px;
}
body #detail-dialog#detail-dialog .recruit-heading-v20 .visual-character-traits-v21,
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .visual-character-traits-v21 {
  display:flex; flex-wrap:wrap; align-items:center;
  width:100%; max-width:100%; gap:4px 10px;
}
body #detail-dialog#detail-dialog .recruit-heading-v20 :is(.visual-character-identity-v21,.visual-character-combat-v21),
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card :is(.visual-character-identity-v21,.visual-character-combat-v21) {
  display:contents;
}
body #detail-dialog#detail-dialog .recruit-heading-v20 .visual-category-chip-v21,
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .visual-category-chip-v21 {
  display:inline-flex; flex:0 1 auto; flex-direction:row; flex-wrap:nowrap;
  align-items:center; min-width:0; width:auto; max-width:100%; min-height:28px; gap:5px;
}
body #detail-dialog#detail-dialog .recruit-heading-v20 .visual-info-copy-v23,
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .visual-info-copy-v23 {
  flex:0 1 auto; min-width:0; max-width:100%;
}
body #detail-dialog#detail-dialog .recruit-heading-v20 .visual-info-caption-v21,
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .visual-info-caption-v21 {
  overflow-wrap:normal; word-break:keep-all; line-height:1.3;
}

body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-grid.codex-v17-grid {
  grid-template-columns:minmax(0,1fr); gap:10px;
}
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-card.codex-v20-card {
  grid-template-columns:72px minmax(0,1fr); align-items:start;
  min-height:0; gap:12px; padding:12px;
}
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .codex-v20-portrait {
  width:72px; height:72px;
}
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .codex-v17-card-copy {
  align-self:start; justify-content:flex-start; gap:4px; min-height:0;
}
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .codex-v17-card-copy > strong {
  font-size:18px; line-height:1.3;
}
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .codex-v17-card-copy > small {
  font-size:max(13px,var(--oa-fs-caption,13px)); line-height:1.4;
}
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .codex-v17-tags {
  width:100%; margin-top:2px;
}
body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-v20-card .codex-v17-card-link {
  margin-top:2px;
}
/* Two columns are only useful once each card can fit its full copy area. */
@media(min-width:900px) {
  body[data-game-ui='v20'] #detail-dialog#detail-dialog[data-ui-window] .recruit-list {
    grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start;
  }
  body #detail-dialog#detail-dialog[data-codex-art-v20='characters'] .codex-grid.codex-v17-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
