/* One compact identity, preserving each original photo and its credit. */
.player-header,.player-header.has-ranking{display:grid;grid-template-columns:96px minmax(0,1fr) auto;align-items:center;gap:20px;padding:24px;margin:20px 0 28px;border-radius:18px}
.player-header .player-avatar{width:96px;height:128px;box-sizing:border-box;padding:4px;font-size:30px;background:var(--paper,var(--surface));border:1px solid var(--line);border-radius:10px;overflow:hidden}
.player-avatar.has-photo img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;border-radius:5px}
.player-header .player-identity{min-width:0}
.player-header .player-identity h1{font-size:clamp(25px,2.8vw,36px);line-height:1.15;margin:0 0 12px;overflow-wrap:anywhere}
.player-meta{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap}
.player-header .player-meta p{margin:0;font-size:14px;line-height:1.5}
.player-header .player-nationality{display:flex;align-items:center;gap:7px;min-height:20px}
.player-nationality img{flex:none;object-fit:contain}
.player-header .player-age{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;color:var(--fg)}
.player-header .player-birthdate{white-space:nowrap;font-size:12px;font-style:italic;color:var(--muted)}
.player-club{margin-top:8px}
.player-club a,.player-club-reference{display:flex;align-items:center;gap:8px;min-height:44px;width:fit-content;max-width:100%;font-size:15px;line-height:1.4;color:var(--fg);text-decoration:none}
.player-club a img,.player-club-reference img{flex:none;width:24px;height:24px;object-fit:contain}
.player-club a span,.player-club-reference span{min-width:0;overflow-wrap:anywhere}
.player-club a span:last-child{color:var(--gold)}
.player-club a small{font-size:12px;white-space:nowrap;color:var(--muted)}
.player-club a:hover{color:var(--gold)}
.player-club a:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:3px}
.player-header .player-facts{display:flex;flex-wrap:wrap;gap:10px 24px;margin:12px 0 0;padding:0;border:0}
.player-header .player-facts:empty{display:none}
.player-header .player-facts>div{min-width:0}
.player-header .player-facts dt{font-size:12px;line-height:1.4;color:var(--muted)}
.player-header .player-facts dd{margin:3px 0 0;font-size:14px;line-height:1.4;color:var(--fg);overflow-wrap:anywhere}
.player-profile-summary{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:16px;min-width:0}
.player-header .player-ranking{margin:0;padding:0;border:0;max-width:140px;text-align:right}
.player-header .player-ranking strong{display:block;font-size:32px;line-height:1.1;color:var(--gold);margin:0 0 6px}
.player-header .player-ranking span,.player-header .player-ranking small{display:block;font-size:12px;line-height:1.5;color:var(--muted)}
.player-header .player-last-rating{display:grid;justify-items:end;gap:6px;margin:0;font-size:12px;color:var(--muted)}
.player-header .player-last-rating .mc-player-rating{font-size:19px;min-height:34px;min-width:46px;margin:0;border-radius:8px}
.player-header .player-last-rating small{font-size:11px}
.player-header .favorite-form{margin:0}
.player-header .favorite-button{min-height:44px;min-width:44px;border-radius:10px}
.player-header .player-biography-date{position:absolute}
@media(max-width:700px){
 .player-header,.player-header.has-ranking{grid-template-columns:72px minmax(0,1fr);gap:16px 14px;padding:20px 16px}
 .player-header .player-avatar{width:72px;height:96px;font-size:24px}
 .player-header .player-identity h1{font-size:25px;margin:0 0 10px}
 .player-header .player-meta{gap:6px 10px}
 .player-header .player-facts{gap:10px 18px;margin-top:10px}
 .player-header .player-facts dd{font-size:13px}
 .player-club a,.player-club-reference{font-size:14px;flex-wrap:wrap;gap:5px 7px}
 .player-profile-summary{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center;gap:14px;border-top:1px solid var(--line);padding-top:14px}
 .player-header .player-last-rating{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
 .player-header .player-last-rating .mc-player-rating{font-size:16px;min-width:40px;min-height:30px}
 .player-header .player-ranking{text-align:left;max-width:none;display:grid;grid-template-columns:auto 1fr;gap:0 10px;align-items:center}
 .player-header .player-ranking strong{grid-row:1/3;font-size:26px;margin:0}
 .player-header .player-ranking span,.player-header .player-ranking small{grid-column:2}
 .player-header .favorite-form{margin-left:auto}
}
@media(max-width:380px){.player-header,.player-header.has-ranking{grid-template-columns:60px minmax(0,1fr);gap:14px 12px;padding:18px 14px}.player-header .player-avatar{width:60px;height:80px}.player-header .player-identity h1{font-size:22px}.player-header .player-meta p{font-size:13px}.player-header .player-birthdate{font-size:11px}.player-header .player-facts{gap:9px 14px}}

.player-photo-credit { min-width: 0; padding: 0; border: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.player-photo-credit[open] { width: 100%; }
.player-photo-credit summary { width: fit-content; min-height: 36px; display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; }
.player-photo-credit summary::-webkit-details-marker { display: none; }
.player-photo-credit summary::before { content: '+'; width: 9px; font-size: 14px; }
.player-photo-credit[open] summary::before { content: '−'; }
.player-photo-credit summary:hover, .player-photo-credit a:hover { color: var(--text); }
.player-photo-credit summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
.player-photo-credit > div { border-top: 1px solid var(--line); padding-top: 10px; max-width: 650px; }
.player-header .player-photo-credit p { display: block; margin: 4px 0; padding: 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.player-photo-credit a { color: inherit; text-underline-offset: 3px; }

/* Match links remain the primary action; secondary details expand only on demand. */
.player-profile .player-match { min-height: 48px; }
.player-profile .player-match time,.player-profile .player-match small { font-size: 13px; }
.player-profile .player-match strong { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.player-profile .player-match b { white-space: nowrap; }
.player-profile .player-performance summary { min-height: 44px; align-items: center; font-size: 14px; }
.player-profile .player-missing { font-size: 13px; }
.player-profile .player-rating-grid h3 { font-size: 14px; }
.player-profile .player-rating-grid p { font-size: 13px; }
.player-profile .player-season form { flex-wrap: wrap; font-size: 14px; }
.player-profile .player-season select { min-height: 44px; border-radius: 9px; font: inherit; }
.player-data-source { margin-top: 22px; color: var(--muted); font-size: 13px; }
.player-data-source summary { cursor: pointer; width: fit-content; min-height: 44px; display: flex; gap: 8px; align-items: center; list-style: none; }
.player-data-source summary::-webkit-details-marker { display: none; }
.player-data-source summary::before { content: '+'; }
.player-data-source[open] summary::before { content: '−'; }
.player-data-source summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.player-data-source .mc-provenance { margin-top: 4px; }

/* Credits sit outside the image. Compact rows keep their existing height. */
.player-portrait { position: relative; display: flex; align-items: center; width: fit-content; flex: none; min-width: 0; }
.player-portrait > .player-avatar { display: grid; place-items: center; }
.player-portrait .player-photo-credit { margin: 0; position: relative; flex: 0 0 44px; width: 44px; z-index: 2; }
.player-portrait .player-photo-credit[open] { width: 44px; z-index: 30; }
.player-portrait .player-photo-credit > summary {
  display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px;
  padding: 0; margin: 0; border: 0; border-radius: 8px; gap: 0; color: var(--muted);
}
.player-portrait .player-photo-credit > summary::before { content: none; }
.player-portrait .player-photo-credit > summary > .player-credit-icon {
  display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: transparent; border: 1px solid currentColor; box-shadow: none;
  margin: 0; color: inherit; font: 600 13px/1 Georgia, serif;
}
.player-portrait .player-photo-credit > summary:hover > .player-credit-icon,
.player-portrait .player-photo-credit[open] > summary > .player-credit-icon { color: var(--gold); border-color: var(--gold); }
.player-portrait .player-photo-credit > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.player-portrait .player-credit-label { display: none; }
.player-header .player-portrait { display: grid; justify-items: center; align-self: start; }
.player-header .player-photo-credit, .player-header .player-photo-credit[open] { width: 100%; }
.player-header .player-photo-credit > summary { display: flex; justify-content: center; width: 100%; gap: 5px; font-size: 11px; line-height: 1.4; }
.player-header .player-credit-label { display: inline; }
.directory-card .directory-person { grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; }
.player-portrait .player-photo-credit > .player-credit-panel {
  position: absolute; top: 100%; left: 0; z-index: 80; box-sizing: border-box;
  width: min(280px, calc(100vw - 40px)); max-height: min(340px, 70vh); overflow: auto;
  padding: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); box-shadow: 0 12px 32px #0003;
  font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; overscroll-behavior: contain;
}
.player-portrait .player-photo-credit[data-positioned] > .player-credit-panel { position: fixed; z-index: 100; }
.player-portrait .player-photo-credit .player-credit-panel p { display: block; margin: 0 0 8px; padding: 0; font-size: 13px; line-height: 1.6; }
.player-portrait .player-photo-credit .player-credit-panel p:last-child { margin-bottom: 0; }
.player-portrait .player-credit-panel a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.player-portrait .player-credit-panel a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.directory-person > .directory-person-link { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; min-height: 72px; }
.directory-person > .directory-person-link:hover strong { color: var(--gold); }
@media (prefers-reduced-motion: no-preference) {
  .player-portrait .player-photo-credit > summary > .player-credit-icon { transition: border-color .15s, color .15s; }
}

/* A lone favourite button does not need a separate row on mobile. */
@media(max-width:700px){.player-header--favorite-only{position:relative}.player-header--favorite-only .player-identity h1{padding-right:40px}.player-header--favorite-only .player-profile-summary{position:absolute;top:12px;right:12px;padding:0;border:0;gap:0}.player-header--favorite-only .favorite-form{margin:0}}


/* One neutral silhouette for missing player photos, across all sports and sizes. */
.player-placeholder{display:block;flex:none;width:76%;height:78%;color:var(--muted,#8f8b82);fill:currentColor;opacity:.6}
