
/* Responsive finishing pass: content-driven widths work in either orientation,
   including narrow foldable panes; no device or orientation lock. */
html { -webkit-text-size-adjust:100%; }
body { min-height:100svh; }
body>main { padding-left:max(20px,env(safe-area-inset-left)); padding-right:max(20px,env(safe-area-inset-right)); }
main, header, header>div, .bb-premium-brand, .bb-premium-type,
.bb-premium-intro-copy, .bb-premium-intro-right, #player-grid-container>* { min-width:0; }
.bb-premium-mark { max-width:100%; }
.bb-premium-search { max-width:100%; }
.bb-goat-portrait { width:100%; min-width:0; }
.bb-goat-hero { min-width:0; }
@media(max-width:700px) { .bb-goat-hero { grid-template-columns:minmax(0,1fr); } }
.bb-premium-intro { flex-wrap:wrap; }
.bb-premium-intro-right { flex-wrap:wrap; }
.bb-premium-stats { flex-wrap:wrap; }
.bb-premium-stats>div:last-child { display:flex; }
#category-nav { max-width:100%; touch-action:pan-x; }
#category-nav>button { min-height:44px; }
#player-grid-container { grid-template-columns:repeat(4,minmax(0,1fr)); }
#player-modal { padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
#player-modal>.apple-glass { max-height:calc(100dvh - max(24px,env(safe-area-inset-top) + env(safe-area-inset-bottom))); overflow-y:auto; overscroll-behavior:contain; }
#player-modal .grid>div { min-width:0; }
#modal-player-img { max-width:100%; height:auto; aspect-ratio:1; }
#modal-player-name,#modal-player-clubs,.bb-goat-facts dd { overflow-wrap:anywhere; }
dialog { max-height:calc(100dvh - 24px); overflow-y:auto; overscroll-behavior:contain; }
.bb-reference-search { min-width:min(220px,100%); }
.bb-card-grid { grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); }
#bb-premium-top { right:max(15px,env(safe-area-inset-right)); bottom:max(18px,env(safe-area-inset-bottom)); }
@media (max-width:1199px) {
 header>#bb-main-header-row { flex-direction:column!important; align-items:stretch!important; }
 header>#bb-main-header-row>div:last-child { width:100%; align-items:center; }
 #player-grid-container { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:899px) {
 #player-grid-container { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
 #player-modal>.apple-glass>.grid { grid-template-columns:1fr; gap:24px; }
 #player-modal .space-y-4 { max-height:none; overflow:visible; padding-right:0; }
 #player-modal .grid>div { grid-column:auto; }
 .bb-vs-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .bb-vs-profile:first-child { grid-column:1;grid-row:1; }
 .bb-vs-profile:last-child { grid-column:2;grid-row:1; }
 #vs-metrics-rows-container { grid-column:1/-1;grid-row:2; }
}
@media (max-width:639px) {
 #player-grid-container { grid-template-columns:1fr; }
 .bb-premium-brand { flex-direction:column!important; }
 .bb-premium-type { text-align:center; }
 .bb-premium-type>div { justify-content:center; }
 .bb-premium-intro-right { align-items:flex-start; gap:18px; }
 .bb-premium-stats { width:100%; justify-content:space-between; gap:10px; }
 .bb-premium-stats>div:last-child { display:flex; }
 .bb-premium-intro h2 { font-size:clamp(22px,6vw,26px); }
 .bb-premium-intro h2 span { display:inline-block; }
 #player-modal>.apple-glass { padding:20px; }
 .bb-tier-row { grid-template-columns:80px minmax(0,1fr); }
 .bb-tier-label { min-width:0; }
 .bb-actions label { min-width:0; flex-basis:100%; }
 .bb-reference-controls>* { max-width:100%; }
 .bb-auth-form { padding-left:20px; padding-right:20px; }
 input:not([type=range]):not([type=color]):not([type=checkbox]),select,textarea { font-size:16px!important; }
}
@media (max-height:500px) and (orientation:landscape) {
 .bb-premium main { padding-top:max(16px,env(safe-area-inset-top)); }
 .bb-premium-brand { flex-direction:row!important; justify-content:center; }
 .bb-premium-mark { width:180px!important; height:100px!important; }
 .bb-premium-type h1 { font-size:38px; }
 #player-modal>.apple-glass { padding:18px; }
 #player-modal>.apple-glass>div:first-child { margin-bottom:16px; }
 #modal-player-img { width:180px; }
 #vs-floating-dock { padding:8px 12px; gap:6px; }
 #bb-vs-launch { width:auto; }
 .bb-vs-slots { flex-basis:0; }
}
