/* One full-page scroll surface for every profile page. */
.profile-page.patronite-overlay,#profileModal:has(.is-editor){display:block;height:100%;padding:0;overflow-x:hidden;overflow-y:auto;background:var(--paper2);scrollbar-gutter:stable;overflow-anchor:none;overscroll-behavior:none;scroll-padding-block:18px;}
.profile-page>.patronite-card,#profileCard.is-editor,.profile-page>.global-profile-card.is-crest-atlas{box-sizing:border-box;width:min(1120px,100%);height:auto;min-height:100%;max-height:none;overflow:visible;margin:0 auto;padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));border:0;box-shadow:none;display:block;}
.profile-page .patronite-close{width:44px;height:44px;top:max(12px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));}
.profile-page .global-profile-tabs{grid-template-columns:repeat(6,minmax(0,1fr));}
.profile-page .global-profile-tabs button{min-width:0;min-height:48px;line-height:1.35;overflow-wrap:anywhere;}
.profile-page .profile-achievement-rows{overflow:visible;}
.profile-page .patronite-actions{position:static;margin:24px 0 0;padding:16px 0 0;background:transparent;}
.profile-page .global-profile-intro{font-size:14px;line-height:1.6;}
.profile-page :is(input,select,textarea){max-width:100%;}
.profile-page :is(.profile-career-summary-content,.global-profile-careers,.crest-atlas-panel){min-width:0;}
.profile-page .crest-atlas-scope{grid-template-columns:repeat(3,minmax(0,1fr));}
.profile-info{padding:24px;border:2px solid var(--line);background:var(--paper);}
.profile-info h4{font-size:24px;margin:0 0 12px;}.profile-info p{margin:0;font-size:15px;}
.crest-editor-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.crest-editor-controls label,.crest-editor-file,.crest-editor-search,.crest-editor-club{display:grid;gap:8px;font-weight:bold;min-width:0;}
.crest-editor-search,.crest-editor-club{margin:16px 0;}
.crest-editor-controls select,.crest-editor-club select{width:100%;min-width:0;min-height:48px;text-overflow:ellipsis;}
.crest-editor-search small{font-weight:normal;line-height:1.5;}
.crest-editor-detail{border:2px solid var(--line);padding:20px;min-width:0;overflow-wrap:anywhere;}
.crest-editor-detail h4{margin:0 0 10px;font-size:24px;}.crest-editor-detail p{font-size:14px;line-height:1.6;}
.crest-editor-preview{display:grid;place-items:center;min-height:180px;margin:16px 0;padding:12px;background:#fff;border:1px solid #999;}
.crest-editor-preview .club-crest{max-width:160px;max-height:160px;}
.crest-editor-hint{color:#555;}.crest-editor-detail [role=status]{font-weight:bold;}
#ppsRecordingStudio{display:block;overflow-y:auto;overscroll-behavior:none;background:var(--paper2);padding:0;height:100%;}
#ppsRecordingStudio .pps-recorder-card{display:block;width:min(1120px,100%);min-height:100%;max-height:none;margin:auto;border:0;box-shadow:none;overflow:visible;}
#ppsRecordingStudio .pps-recorder-scroll{overflow:visible;}
@media(max-width:700px){
 .profile-page>.patronite-card,#profileCard.is-editor,.profile-page>.global-profile-card.is-crest-atlas{padding:max(18px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));}
 .profile-page .global-profile-tabs{grid-template-columns:repeat(3,minmax(0,1fr));}
 .profile-page .global-profile-tabs button{font-size:10px;padding:10px 4px;letter-spacing:.2px;}
 .profile-page .global-profile-stats{grid-template-columns:repeat(2,minmax(0,1fr));}
 .profile-page .global-profile-stats>div{grid-column:auto;}
 .profile-page .global-profile-stats .wide,.profile-page .global-profile-stats .profile-record-wide{grid-column:1/-1;}
 .crest-editor-controls{grid-template-columns:minmax(0,1fr);}
 .profile-page :is(input,select,textarea){font-size:16px;}
 .profile-page .crest-atlas-more{min-width:0;width:100%;}
 .profile-page .profile-career-numbers span{min-width:0;flex:1;padding:8px 6px;}
 .profile-page .profile-career-numbers{max-width:100%;}
 .profile-info{padding:18px;}
}
/* Keep the main controls reachable before a compact season starts. */
body.pps-compact-ui.pps-career-live:has(#preseasonBriefing:not(.hidden):not(.proto-dismissed)) .topbar{position:relative;z-index:9800;background:var(--paper);}
body.pps-compact-ui .preseason-briefing:not(.hidden):not(.proto-dismissed){top:calc(var(--compact-top,46px) + 30px);}
body.pps-compact-ui .preseason-briefing:not(.hidden):not(.proto-dismissed)>.proto-briefing-card{max-height:calc(var(--pps-viewport-height,100dvh) - var(--compact-top,46px) - 50px);}

/* Two rows of sections and a full-width workshop entry. */
.profile-page .global-profile-tabs{grid-template-columns:repeat(3,minmax(0,1fr));}
.profile-page #profileStatisticsPanel{min-width:0;}

/* Information stays readable and searchable offline, including full notices. */
.profile-info p{line-height:1.65;}
.profile-info a{overflow-wrap:anywhere;text-decoration:underline;}
.profile-contact-links{list-style:none;padding:0;margin:22px 0 0;display:grid;gap:14px;}
.profile-contact-links a{display:inline-block;padding:8px 0;}
.profile-licence{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);}
.profile-licence h5{font-size:17px;margin:0 0 8px;}
.profile-licence details{margin-top:12px;}
.profile-licence summary{cursor:pointer;padding:10px 0;font-weight:bold;}
.profile-licence pre{font:12px/1.6 monospace;white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:rgba(0,0,0,.04);max-height:360px;overflow:auto;}
