/* Small screens, zoom, notches and touch input; no fixed content heights. */
html { scroll-padding-top: 72px; }
.mobile-section-picker { display: none; }
body { min-width: 0; }
.shell {
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
}
.footer { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
.directory-controls input, .directory-controls select { font-size: 1rem; min-height: 48px; }
.directory-controls select { min-width: 0; width: 100%; }
.ghost, .tab, .close, .region-grid summary { min-height: 48px; }
.region-grid summary { padding-block: 10px; }
.source-link, .photo-card figcaption a { padding-block: 10px; }
.source-link, .history, .info-card a { overflow-wrap: anywhere; }
.section-tabs { overscroll-behavior-x: contain; scroll-padding-inline: 12px; }
.drawer {
  height: 100vh;
  height: 100dvh;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  padding-right: max(18px, env(safe-area-inset-right));
  scrollbar-gutter: stable;
}
.drawer .close {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 48px;
  background: #273039;
  box-shadow: 0 0 0 4px #11171c;
}
.club-mark { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin: 0 0 18px; border-radius: 12px; background: #fff; color: #17232b; border: 1px solid var(--line); overflow: hidden; }
.club-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 7px; background: #fff; }
.club-mark.has-mark .mark-fallback { visibility: hidden; }
.mark-fallback { font-size: 24px; font-weight: 900; }
.mark-caption { display: block; margin-top: 8px; line-height: 1.5; }
.drawer .club-mark { width: 128px; height: 128px; margin-top: 30px; }
.player-top { gap: 12px; }
.player-card .position { text-align: right; }
@media (min-width: 641px) {
  .shell { padding-inline: max(34px, env(safe-area-inset-left)) max(34px, env(safe-area-inset-right)); }
}
@media (max-width: 540px) {
  .mobile-section-picker { display: grid; gap: 6px; margin-bottom: 16px; font-size: .875rem; color: var(--muted); }
  .mobile-section-picker select { width: 100%; min-width: 0; min-height: 48px; font-size: 1rem; }
  .section-tabs { display: none; }
  .hero-copy > p { display: block; margin-top: 10px; line-height: 1.5; }
  .hero h1 { line-height: 1.15; }
  .directory-controls, .player-grid, .club-grid, .details-grid, .region-grid { padding: 14px; }
  .panel-head, .result-note { padding-inline: 14px; }
  .panel-head > div, .pager > *, .top-actions { min-width: 0; }
  .pager { padding: 14px; gap: 8px; }
  .pager #page { font-size: .875rem; text-align: center; }
  .photo-card img { height: auto; aspect-ratio: 4 / 3; }
  .drawer .detail-stats { grid-template-columns: 1fr; }
}
@media (hover: none) {
  .player-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
