/* Shared responsive layer: content can reflow; only wide tables scroll sideways. */
:root{color-scheme:light;--safe-top:env(safe-area-inset-top,0px);--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
html{min-width:0;-webkit-text-size-adjust:100%;text-size-adjust:100%;scrollbar-gutter:stable}
body{min-width:0;background:#fff;--paper:#fff}
main,section,article,nav,form,fieldset,details{min-width:0}
fieldset{min-inline-size:0}
:where(h1,h2,h3,h4,p,li,dt,dd,label,legend,summary,a,button){overflow-wrap:anywhere}
:where(input,select,textarea){font:inherit;font-size:16px;min-width:0;max-width:100%;box-sizing:border-box}
:where(input[type=date],input[type=time]){min-inline-size:0;max-inline-size:100%;-webkit-appearance:none;appearance:none}
:where(input[type=date],input[type=time])::-webkit-date-and-time-value{text-align:start;min-height:1.4em}
:where(input[type=file]){width:100%;overflow:hidden}
:where(button,.primary,.secondary){white-space:normal;line-height:1.5;max-width:100%;touch-action:manipulation}
:where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #aa6339;outline-offset:3px}
:where(img,video,canvas){max-width:100%}
:where(.main,.tournament-frame,.club-panel,.learning-panel,.plan-panel,.member-card,.category,.card,.workspace-card,.sms-mode,.sms-preview){min-width:0}
:where(.club-fields,.plan-fields,.exam-fields,.exam-filters,.sms-form)>*{min-width:0}
:where(.club-actions,.learning-actions,.reader-actions,.access-navigation,.translation-actions,.plan-controls){flex-wrap:wrap}
:where(.club-actions,.learning-actions,.reader-actions,.access-navigation,.translation-actions)>:where(button,a){min-height:44px}
header,.member-header,.header-actions{flex-wrap:wrap}
.header-actions{flex-shrink:1;min-width:0}
.panel-brand,.member-brand{min-width:0;flex-wrap:nowrap}.panel-brand>span:last-child,.member-brand>span:last-child{min-width:0;overflow-wrap:anywhere}
.panel-brand small{line-height:1.6}.panel-top,.member-header{column-gap:16px;row-gap:12px}
:where(.club-table-wrap,.article-table-wrap,.plan-source-table,.order-scroll){width:100%;max-width:100%;min-width:0;overflow:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
:where(.club-table-wrap,.article-table-wrap,.plan-source-table,.order-scroll):focus-visible{outline:3px solid #497510;outline-offset:2px}
.article-figure img,.plan-source-section img{height:auto;object-fit:contain}.article-body{min-width:0}
.section-top{flex-wrap:wrap}.search{max-width:100%}.sort{max-width:100%;white-space:normal}.sort select{min-width:0}
.plan-panel-top{flex-wrap:wrap}.plan-heading>div{min-width:0}.plan-count{white-space:normal}.plan-controls>*{min-width:0}
.chip{white-space:normal;flex-shrink:0}.filters #subgroups{max-width:100%;min-width:0}
.sms-mats{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}.sms-form button{align-self:end;min-height:48px}
.order-tools label,.order-tools button{min-width:0}.order-header{padding-left:max(16px,var(--safe-left));padding-right:max(16px,var(--safe-right))}
.member-main{min-width:0}.member-main>*{min-width:0}.member-name-row{grid-template-columns:repeat(2,minmax(0,1fr))}
:where(.launcher-main,#entry-portal){min-height:calc(100vh - 190px);min-height:calc(100dvh - 190px)}
:where(.panel-top,.tournament-topbar,.member-header){padding-top:max(16px,var(--safe-top));padding-left:max(16px,var(--safe-left));padding-right:max(16px,var(--safe-right))}
:where(.launcher-main,.tournament-panel-content,.order-main,#entry-portal){padding-bottom:max(40px,calc(24px + var(--safe-bottom)))}
.tournament-sidebar{padding-left:max(18px,var(--safe-left));padding-right:max(18px,var(--safe-right));padding-top:max(24px,var(--safe-top));padding-bottom:max(20px,var(--safe-bottom));scrollbar-gutter:stable}
@media(max-width:1024px){
 .tournament-sidebar{display:none;top:var(--tournament-topbar-height,82px);bottom:0;width:min(320px,92vw);padding-top:18px;box-shadow:16px 0 40px #26351d26;z-index:7}
 .tournament-sidebar.menu-open{display:flex}.tournament-frame{margin-left:0}.tournament-menu-toggle{display:inline-flex;min-height:48px}
 .tournament-topbar{position:sticky;top:0;z-index:8;min-height:76px;gap:12px;background:#fff}.tournament-breadcrumb{display:none}
 .tournament-panel-content{padding:26px max(20px,var(--safe-right)) 48px max(20px,var(--safe-left))}
}
@media(min-width:1025px){.tournament-sidebar{display:flex}.tournament-frame{margin-left:272px}}
@media(min-width:1025px) and (max-width:1100px){.tournament-frame{margin-left:248px}}
@media(max-width:700px){
 .panel-top .panel-brand{flex:1 1 210px}.workspace-card{padding:24px}.launcher-cards{grid-template-columns:1fr}
 .club-fields,.exam-fields,.plan-fields,.exam-filters{grid-template-columns:minmax(0,1fr)}
 .plan-fields>:first-child,.exam-fields>:first-child{grid-column:auto}
 .athlete-card{align-items:stretch;flex-direction:column}.athlete-card>.club-actions{width:100%}
 .club-actions button,.club-actions>a{flex:1 1 150px}.role-permission{align-items:flex-start}
 .plan-controls>button{flex:1 1 120px}.plan-heading{flex-wrap:wrap}
 .sms-form{grid-template-columns:minmax(0,1fr)}
 .tournament-panel-content{padding-inline:max(14px,var(--safe-left)) max(14px,var(--safe-right))}
 .tournament-home-grid{grid-template-columns:minmax(0,1fr)}
 .tournament-panel-content .club-panel,.entry-only-panel .club-panel{padding:18px 14px}
 .article-reading .reader-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
 .reader-actions button,.reader-actions a{min-height:44px}
 .learning-shortcuts{flex-wrap:wrap}.learning-shortcuts>:where(button,a){flex:1 1 140px;min-width:0}
 .order-tools>*{flex:1 1 100%}.order-scroll{position:relative}.order-help{font-size:14px}
 .club-status{position:static}.member-header{align-items:flex-start}.member-language{margin-left:auto}
}
@media(max-width:380px){
 .member-name-row{grid-template-columns:1fr;gap:0}.member-main{padding-inline:12px}.member-card{padding:20px 14px}
 .header-actions{flex:1 1 100%;justify-content:flex-end}.mobile-brand{flex:1 1 150px}
 .page-tools{flex-wrap:wrap;justify-content:center}.reading #reader{padding-bottom:calc(165px + var(--safe-bottom))}
 .tournament-topbar>*{flex:1 1 140px}.tournament-topbar{gap:8px}
 .plan-controls{flex-direction:column}.plan-controls button{flex:auto;width:100%}
 .category strong{font-size:14px}.sms-actions button{flex:1 1 100%}
}
/* Keyboard-open pages scroll naturally; fixed navigation must not cover fields. */
.keyboard-open .mobile-nav{display:none}.keyboard-open .club-status{position:static}
@media(hover:none) and (pointer:coarse){
 :where(.club-tabs,.access-navigation,.plan-controls,.sms-actions) button{min-height:48px}
 .workspace-card:hover{transform:none;box-shadow:none}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
@media print{.tournament-sidebar,.tournament-topbar,.mobile-nav,.header-actions{display:none!important}.main,.tournament-frame{margin:0}.tournament-panel-content{max-width:none;padding:0}.club-status{position:static}}
/* The regular board fits its dialog; fixed-proportion presentation is unchanged. */
.scoreboard-shell{width:min(1200px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:96vh;max-height:96dvh;margin:auto;inset:0;padding:0;border-radius:16px;overflow:visible}
.scoreboard-shell>.judo-scoreboard:not(.is-score-fullscreen){width:100%;max-width:100%;max-height:94vh;max-height:94dvh;overflow:auto;padding:clamp(12px,2vw,24px)}
.judo-scoreboard.is-score-fullscreen{height:100vh;height:100dvh;width:100%;max-width:100%;padding-bottom:var(--safe-bottom)}
.scoreboard-shell .score-controls select,.scoreboard-shell .score-controls input{font-size:16px}
.judo-scoreboard .score-toolbar button{min-height:44px;white-space:normal}
.judo-scoreboard.is-score-fullscreen .score-toolbar button{min-height:44px}
.score-correction-overlay{position:fixed;max-height:calc(90vh - var(--safe-top));max-height:calc(90dvh - var(--safe-top));overflow:auto}
.judo-scoreboard.is-score-fullscreen .score-tools-open{overflow:auto}
.scoreboard-shell .score-toolbar{align-items:stretch}.score-toolbar [aria-pressed=true]{outline:2px solid #ffdc45;outline-offset:2px}
/* Optional large-control layout preserves scores/timers while allowing reflow. */
.judo-scoreboard.score-touch-layout .score-stage{overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 max(8px,var(--safe-right)) 16px max(8px,var(--safe-left))}
.judo-scoreboard.score-touch-layout .score-main{position:relative;inset:auto;transform:none;width:100%;height:auto;min-width:0;padding:8px 0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:'clock' 'display' 'hold';gap:18px}
.judo-scoreboard.score-touch-layout .score-display{grid-area:display;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.judo-scoreboard.score-touch-layout .score-clock-cluster{grid-area:clock;position:sticky;top:0;z-index:2;background:#101923;margin:0;padding:10px 0;gap:8px;box-shadow:0 5px 10px #101923}
.judo-scoreboard.score-touch-layout .score-clock{font-size:clamp(42px,7vw,72px);line-height:1.1;padding:0}
.judo-scoreboard.score-touch-layout .score-clock-toggle{width:min(100%,540px);height:64px;min-height:64px;font-size:26px}
.judo-scoreboard.score-touch-layout .score-hold{grid-area:hold;grid-template-columns:repeat(2,minmax(0,1fr));margin:0}
.judo-scoreboard.score-touch-layout .score-side{padding:14px;overflow:visible}
.judo-scoreboard.score-touch-layout .score-side h3{font-size:clamp(20px,3vw,28px);line-height:1.4}.judo-scoreboard.score-touch-layout .score-side>p{font-size:14px;line-height:1.6}
.judo-scoreboard.score-touch-layout .score-cell>span{font-size:12px;min-height:36px;line-height:1.5}
.judo-scoreboard.score-touch-layout .score-cell strong{font-size:40px}
.judo-scoreboard.score-touch-layout .score-cell button{min-width:44px;min-height:48px;font-size:20px;padding:4px}
.judo-scoreboard.score-touch-layout .score-hold-title{font-size:20px}.judo-scoreboard.score-touch-layout .score-hold-recipient{font-size:14px;line-height:1.5}
.judo-scoreboard.score-touch-layout .score-hold-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.judo-scoreboard.score-touch-layout .score-hold-actions button{min-height:48px;font-size:16px;padding:10px 6px}
.judo-scoreboard.score-touch-layout .score-hold-side{padding:14px;gap:10px}
.judo-scoreboard.score-touch-layout>.score-message{position:static;transform:none;max-width:none;margin:0;padding:8px 12px;flex-shrink:0}
@media(max-width:700px){.judo-scoreboard.score-touch-layout .score-display,.judo-scoreboard.score-touch-layout .score-hold{grid-template-columns:minmax(0,1fr)}.judo-scoreboard .score-controls{grid-template-columns:minmax(0,1fr)}.score-toolbar button{flex:1 1 130px}.scoreboard-shell{width:calc(100% - 16px);max-width:calc(100% - 16px)}}
@media(orientation:landscape) and (max-height:500px){.judo-scoreboard.score-touch-layout .score-clock-cluster{position:static}.judo-scoreboard.score-touch-layout .score-clock{font-size:42px}.judo-scoreboard.score-touch-layout .score-clock-toggle{height:52px;min-height:52px}.judo-scoreboard.is-score-fullscreen .score-toolbar button{flex:1 1 auto;font-size:12px}}

/* Prominent, wrapping return links remain at the top of each panel. */
.panel-return-nav{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:16px;min-width:0}
.panel-return-link,.tournament-topbar .panel-return-link{font-size:16px;font-weight:800;line-height:1.45;white-space:normal;text-align:left;min-height:44px;max-width:100%;box-sizing:border-box}
.tournament-topbar>.panel-return-nav{flex:1 1 100%;margin-bottom:0}.tournament-topbar{flex-wrap:wrap}
.tournament-sidebar>.panel-return-link,.sidebar>.panel-return-link{margin-bottom:16px;flex-shrink:0}
.broadcast-header>.panel-return-nav,.order-header>.panel-return-nav{flex:1 1 100%;margin-bottom:0}
@media(max-width:600px){.panel-return-nav{width:100%}.panel-return-nav>.panel-return-link{flex:1 1 100%}}
@media print{.panel-return-nav,.panel-return-link{display:none!important}}

/* Education navigation is outside headers hidden in landscape reader mode. */
.education-return-nav{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:10px;padding:16px max(20px,env(safe-area-inset-right,0px)) 16px max(20px,env(safe-area-inset-left,0px));background:#fff;border-bottom:1px solid #dbe4df;box-sizing:border-box;width:100%;min-width:0}
.education-return-nav>.secondary{display:flex;align-items:center;justify-content:flex-start;flex:0 1 auto;min-height:48px;min-width:0;max-width:100%;box-sizing:border-box;padding:12px 16px;font-family:inherit;font-size:16px;font-weight:800;line-height:1.45;text-align:left;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
.education-return-nav>.secondary:focus-visible{outline:3px solid #17695e;outline-offset:3px}
@media(max-width:700px){.education-return-nav{gap:8px;padding:12px max(14px,env(safe-area-inset-right,0px)) 12px max(14px,env(safe-area-inset-left,0px))}.education-return-nav>.secondary{flex:1 1 230px}}
@media print{.education-return-nav{display:none!important}}

/* Shared management-tournament application panels. */
.general-role-panel,.general-application-reviews{min-width:0;max-width:100%;overflow-wrap:anywhere}.general-role-panel .club-fields>*,.general-application-reviews .club-fields>*{min-width:0}.general-role-panel input,.general-role-panel select{width:100%;max-width:100%;box-sizing:border-box}.general-role-panel>.club-actions{margin-bottom:16px;flex-wrap:wrap}.general-application-reviews{margin-bottom:24px}.general-application-reviews>h3{color:var(--teal,#497510)}
@media(max-width:600px){.general-role-panel .club-fields,.general-application-reviews .club-fields{grid-template-columns:minmax(0,1fr)}.general-role-panel .club-actions button{flex:1;white-space:normal}.general-application-reviews .club-panel{padding:16px}}
