.catalog-dialog { color:var(--text); background:#0c1a21; border:1px solid var(--border); border-radius:20px; width:min(720px,calc(100% - 20px)); max-height:calc(100dvh - 32px); padding:0 16px 20px; overscroll-behavior:contain; }
.catalog-dialog::backdrop { background:rgba(0,0,0,.72); }
.catalog-dialog-top { position:sticky; top:0; z-index:1; background:#0c1a21; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--border); }
.catalog-dialog-top h2 { font-size:18px; margin:0; }
.catalog-dialog-top button { min-height:44px; border:1px solid var(--border); border-radius:12px; background:#16303a; color:var(--text); padding:8px 12px; }
.catalog-name { font-size:23px; margin:18px 0 8px; overflow-wrap:anywhere; }
.catalog-context { color:var(--hint); font-size:12px; line-height:1.6; }
.catalog-info { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.catalog-info div { padding:10px; background:#10232b; border-radius:10px; overflow-wrap:anywhere; }
.catalog-info dt { font-size:12px; color:var(--hint); }
.catalog-info dd { margin:5px 0 0; font-weight:650; }
.catalog-section { margin-top:22px; }
.catalog-section h3 { font-size:16px; }
.catalog-stat-scroll { overflow-x:auto; }
.catalog-section table { width:100%; border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; }
.catalog-section th,.catalog-section td { padding:10px 7px; border-bottom:1px solid var(--border); text-align:right; }
.catalog-section th:first-child { text-align:left; font-weight:500; }
.catalog-section thead { color:var(--accent-2); }
#teams-view .catalog-card,#players-view .catalog-card { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:8px; }
.catalog-open { display:flex; align-items:center; gap:12px; min-width:0; border:0; background:none; color:var(--text); text-align:left; padding:0; font-size:16px; font-weight:700; }
.catalog-open span { overflow-wrap:anywhere; min-width:0; }
.catalog-open::after { content:""; position:absolute; inset:0; border-radius:15px; cursor:pointer; }
.catalog-card .favorite-button { position:relative; z-index:1; align-self:start; }
.catalog-card p { color:var(--hint); font-size:13px; margin:0; grid-column:1/-1; }
.catalog-hint { color:var(--accent-2); font-size:12px; grid-column:1/-1; }
.catalog-open:focus-visible::after { outline:2px solid var(--accent-2); outline-offset:3px; }
.catalog-pages { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:16px 0; color:var(--hint); }
.catalog-pages button { min-height:44px; }
.catalog-pages button:disabled { opacity:.4; cursor:default; }

/* Catalogue portraits use a square viewport, not the legacy 64x78 frame. */
#players-view .catalog-card .player-photo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  background: #16303a;
}
/* Soften baked-in white studio backgrounds without recolouring text or badges. */
#players-view .catalog-card img.player-photo {
  filter: brightness(.86);
}
#players-view .catalog-card .player-photo.badge-fallback {
  display: grid;
  place-items: center;
}
