/* Shared presentation overrides. Data and form rules stay in their modules. */
html[data-theme]{--brand-gradient:linear-gradient(110deg,#087eae,#6333d0 60%,#bf15ce)}
html[data-theme] :is(.squad-team .squad-player,.squad-team .squad-player[data-selected=true],.sidebar,#admin-navigation.sidebar,.side-link,.side-link:not(.active),.form-card,.form-details,.form-section,.status-row,.round-slot-button){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-theme] .squad-team .squad-player[data-selected=true]{background:color-mix(in srgb,var(--accent) 7%,var(--panel))}
html[data-theme] :is(.sidebar,.rlf-admin-sidebar){background:var(--panel);border-color:var(--line)}
html[data-theme] :is(.side-link,.side-link:visited){color:var(--text);border:1px solid var(--line);border-radius:12px;margin:4px 0;min-height:48px}
html[data-theme] .side-link.active{background:var(--panel2);color:var(--accent);border-color:var(--accent)}
html[data-theme] .protocol-editor .squad-circles button{background:var(--panel2);color:var(--text);border-color:var(--line)}
html[data-theme] .protocol-editor .squad-circles button[aria-pressed=true]{background:var(--accent);color:var(--panel);border-color:var(--accent)}
html[data-theme=dark] .protocol-editor .squad-circles button[aria-pressed=true]{color:#07182f}
html[data-theme] :is(.squad-player-details[open]>summary,.protocol-savebar #editor-status,.squad-player [data-player-totals],.help,.section-copy){color:var(--muted)}
html[data-theme] .squad-team [data-squad-count]{color:var(--danger)}html[data-theme] .squad-team [data-squad-count][data-valid=true]{color:var(--success)}
html[data-theme] :is(.calendar-panel,.calendar-layout,.form-details summary,.editor-section,.field-group){border-color:var(--line)}
html[data-theme] .match-admin-header{border-color:var(--accent)}
html[data-theme] .hero-image{filter:none}
html[data-theme] .news-art{background:linear-gradient(130deg,var(--panel2),color-mix(in srgb,var(--accent) 12%,var(--panel)))}
html[data-theme] .news-art:after{color:var(--accent);opacity:.12}
.rlf-header{width:100%;max-width:none;display:flex;align-items:center;flex-wrap:wrap;gap:20px;padding:14px max(20px,calc((100% - 1320px)/2));border-bottom:1px solid var(--line);margin:0;background:var(--panel);position:relative;z-index:60}
.rlf-brand{display:flex;align-items:center;gap:12px;color:var(--text);flex-shrink:0;text-decoration:none}.rlf-brand img{width:52px;height:52px;object-fit:contain;border-radius:10px;background:#fff}.rlf-brand span{display:flex;align-items:center;gap:14px}.rlf-brand b{font-size:32px;line-height:1;letter-spacing:-.03em}.rlf-brand small{font-size:11px;line-height:1.3;letter-spacing:.02em}
.rlf-header-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.rlf-header :is(button,.action){font:600 13px system-ui;padding:10px 13px;min-height:44px;border-radius:12px;white-space:nowrap}.rlf-header .compact-theme,.topbar .compact-theme{font:600 12px system-ui;padding:9px 12px;min-height:44px;white-space:nowrap;border-radius:12px}
.rlf-public-nav{display:flex;gap:5px;align-items:center;width:100%;border-top:1px solid var(--line);padding:6px 0 0}.rlf-public-nav a{padding:9px 12px;border-radius:9px;font-size:13px}.rlf-public-nav a[aria-current=page]{background:var(--panel2);color:var(--accent)}#public-menu-toggle{display:none}
.rlf-admin-layout{display:grid;grid-template-columns:220px minmax(0,1fr);max-width:1500px;margin:auto;gap:24px;padding:22px}.rlf-admin-layout>main{min-width:0;width:100%;max-width:none;margin:0;padding:0}.rlf-admin-sidebar{display:flex;flex-direction:column;gap:6px;align-self:start;padding:12px;border:1px solid var(--line);border-radius:16px;position:sticky;top:20px}.rlf-admin-sidebar a{display:flex;align-items:center;gap:12px;font-size:14px;min-height:46px;padding:10px;border-radius:9px}.rlf-admin-sidebar b{font-size:11px;color:var(--accent)}.rlf-admin-sidebar a[aria-current=page]{background:var(--panel2);color:var(--accent)}.rlf-admin-caption{font-size:14px;color:var(--muted)}[data-shell-menu]{display:none}
body:not(.admin-ui) main .hero:not(.home-hero){margin:18px 0 24px}body:not(.admin-ui) main .hero:not(.home-hero) h1{font-size:clamp(28px,4vw,48px)}.toolbar{flex-wrap:wrap;margin:8px 0 20px;gap:10px}.toolbar a{font-size:13px}.layout-toggle{display:block;margin:20px auto 8px;min-height:44px;font-size:13px;border-radius:12px;padding:10px 18px}html[data-layout=desktop] body{min-width:1280px}
.news-cover{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:14px}.news-art img{width:100%;height:100%;object-fit:cover}.news-cover-preview{width:100%;max-width:480px;aspect-ratio:16/9;object-fit:contain;border-radius:12px;background:var(--panel2)}.news-card .status-row{display:flex;gap:8px;flex-wrap:wrap}.news-card .status-row button{min-height:44px}.news-featured-badge{display:inline-block;padding:5px 10px;border-radius:7px;background:var(--panel2);color:var(--accent);font-weight:700;font-size:12px}.ad-slot{margin:24px auto;text-align:center;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--panel);max-width:100%;min-width:0}.ad-slot>small{display:block;font-size:10px;letter-spacing:.12em;color:var(--muted);padding:6px}.ad-slot>div{min-height:100px}.ad-slot[data-ad-slot=sidebar]>div{min-height:250px}.ad-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.ad-settings-grid>label{display:flex;flex-direction:column;gap:6px}.site-settings-form fieldset{border:1px solid var(--line);border-radius:12px;padding:16px;margin:18px 0}.site-settings-form textarea{width:100%;min-height:130px}.site-settings-form input{width:100%}.site-settings-form input[type=checkbox]{width:20px;height:20px}.site-settings-form label{font-size:14px}.round-slot-button{border:1px dashed var(--accent);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:70px;padding:8px;width:100%;font:600 12px system-ui}.round-slot-button strong{font-size:12px}.round-slot-button .round-avatar{width:48px;height:48px}.round-pitch .pitch-player:has(.round-slot-button){width:92px}.round-slot-button small{font-size:10px}.round-picker{width:min(560px,calc(100vw - 24px));max-height:85dvh;padding:20px;overflow:auto}.round-picker .formation-candidates{max-height:50dvh}.round-picker input{width:100%}.news-editor-actions{display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:1000px){.rlf-admin-layout{grid-template-columns:minmax(0,1fr);padding:16px;gap:0}.rlf-admin-sidebar{display:none;position:relative;top:0;margin-bottom:16px}.rlf-admin-sidebar.open{display:grid;grid-template-columns:1fr 1fr}[data-shell-menu]{display:block}.rlf-admin-caption{display:none}.rlf-header{padding:12px 16px;gap:10px}.rlf-brand small{font-size:10px}.rlf-brand b{font-size:28px}}
@media(max-width:740px){.rlf-header{align-items:center;flex-direction:row}.rlf-brand img{width:40px;height:40px}.rlf-brand span{gap:7px}.rlf-brand small{display:none}.rlf-header-actions{gap:5px}.rlf-header :is(button,.action){font-size:11px;padding:9px}.rlf-header .compact-theme{font-size:11px;padding:9px}#public-menu-toggle{display:block}.rlf-public-nav{display:none;grid-template-columns:1fr 1fr;margin:0;padding:10px 0 0;gap:6px}.rlf-public-nav.open{display:grid}.rlf-public-nav a{padding:12px;background:var(--panel2)}.toolbar{margin:0 0 14px}.toolbar a{font-size:12px}.panel h2{font-size:21px}.ad-settings-grid{grid-template-columns:1fr}.unified-admin main>h1{font-size:28px;margin:14px 0}.unified-admin main>p{font-size:14px}.round-controls{gap:10px}.round-editor-actions{display:flex;flex-wrap:wrap}.round-editor-actions button{flex:1 1 160px;min-height:46px}.topbar .topbar-inner{gap:8px}.topbar .brand-name{font-size:13px}.topbar .compact-theme{margin-left:auto}.topbar .brand-logo{width:42px;height:42px}.ad-slot{margin:18px 0}.mobile-card-table{border-color:var(--line)}.protocol-section h3{font-size:21px}}
@media(max-width:380px){.rlf-header{padding:10px}.rlf-header .compact-theme{max-width:125px}.rlf-brand{gap:6px}.rlf-brand b{font-size:24px}.rlf-header-actions{gap:4px}.rlf-admin-sidebar.open{grid-template-columns:1fr}.squad-player-row{align-items:start}}
@media print{.ad-slot,.rlf-header,.layout-toggle{display:none!important}}

/* Home: compact sports cards and a wide hero based on the supplied reference. */
.home-page .shell{width:min(1320px,calc(100% - 40px));max-width:1320px}.home-page .site-header{padding:0}.home-page .header-inner{display:flex;align-items:center;gap:16px;min-height:78px;padding:8px 0}.home-page .brand{gap:12px}.home-page .brand img{width:48px;height:48px}.home-page .brand strong{font-size:30px}.home-page .brand small{font-size:10px;line-height:1.2}.home-page .main-nav{gap:4px;flex-wrap:wrap;justify-content:center}.home-page .main-nav a{font-size:11px;padding:7px}.home-page .header-actions{gap:6px;flex-shrink:0}.home-page .header-actions .button{padding:10px 14px;min-height:44px}.home-page .home-hero{position:relative;min-height:420px;overflow:hidden;background:#071844}.home-hero-image{position:absolute;width:100%;height:100%;inset:0;object-fit:cover;object-position:center}.home-hero:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#031842a8,transparent 78%);pointer-events:none}.home-hero-inner{position:relative;z-index:1;padding:42px 0;color:#fff}.home-kicker{font-size:11px;font-weight:800;letter-spacing:.18em;color:#fff}.home-page .home-hero h1{font-size:100px;letter-spacing:-.04em;line-height:1;margin:16px 0 8px;color:#fff}.home-page .home-hero h2{font-size:28px;color:#fff;margin:0 0 14px;max-width:550px}.home-page .home-hero p{color:#e4edff;font-size:16px;line-height:1.6;margin:0 0 22px}.home-hero .button{background:linear-gradient(105deg,#09b8e2,#5d45ee,#e218ca)!important;color:#fff!important;min-height:44px;padding:12px 22px;border-radius:28px}.hero-motto{position:absolute;z-index:1;right:4%;bottom:28px;font:900 italic 26px/1.1 system-ui;color:#fff;text-shadow:0 3px 20px #071844}.hero-motto span{color:#50eccd}.home-page .section{padding-top:0;padding-bottom:0;margin-top:28px;margin-bottom:28px}.home-page .section-heading{margin-bottom:16px;gap:14px;align-items:center}.home-page .section-heading h2{font-size:24px;line-height:1.25;margin:0}.home-page .section-heading a{font-size:12px;white-space:nowrap}.home-page .home-tournaments{margin-top:18px;margin-bottom:22px}.home-tournaments>.section-heading{display:none}.home-page .cards-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.tournament-tile{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-top:3px solid var(--accent);background:var(--panel);border-radius:12px;padding:16px 12px;min-width:0}.tournament-tile:nth-child(3n+2){border-top-color:var(--accent2)}.tournament-tile:nth-child(3n){border-top-color:var(--success)}.tournament-tile img{width:42px;height:48px;object-fit:contain;flex-shrink:0}.tournament-tile span{min-width:0;flex:1}.tournament-tile strong{display:block;font-size:15px;line-height:1.3;overflow-wrap:anywhere}.tournament-tile small{display:block;font-size:10px;margin-top:5px;color:var(--muted)}.tournament-tile>b{color:var(--accent)}.home-match-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(350px,1fr);gap:18px}.home-box{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;min-width:0}.home-page .standings-card{padding:18px}.home-page .results-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.home-page .result-card{min-width:0;padding:14px;border:1px solid var(--line);border-top:2px solid var(--accent);border-radius:12px}.home-page .result-card:nth-child(even){border-top-color:var(--accent2)}.home-page .result-card time{font-size:13px;display:block;margin:5px 0}.home-page .result-card small{font-size:11px}.home-page .competition{text-align:left;font-size:11px;min-height:20px}.home-scoreline{display:grid;grid-template-columns:1fr 48px 1fr;align-items:center;gap:6px;margin:14px 0}.home-scoreline>span{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;gap:8px}.home-scoreline img{width:56px;height:56px;object-fit:contain}.home-scoreline strong{font-size:13px;overflow-wrap:anywhere;line-height:1.3}.home-scoreline>b{text-align:center;font-size:20px;color:var(--accent)}.home-page .venue{display:block;padding-top:10px;border-top:1px solid var(--line);min-height:30px}.home-standings-label{font-size:11px;display:flex;align-items:center;gap:10px;margin-bottom:12px;color:var(--muted)}.home-standings-label select{flex:1;min-width:0;font-size:12px;padding:9px}.home-page .standings-card td,.home-page .standings-card th{padding:12px 5px;font-size:12px;white-space:normal}.home-page .standings-card td:nth-child(2) a{display:flex;align-items:center;gap:7px}.home-page .standings-card td img{width:22px;height:24px;object-fit:contain}.home-page .standings-card tbody tr:first-child{background:color-mix(in srgb,var(--success) 13%,var(--panel))}.home-page .standings-card .more-link{font-size:12px}.home-news-layout:has(.ad-slot:not([hidden])){display:grid;grid-template-columns:1fr 300px;gap:20px}.home-page .news-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.home-page .news-card{border:1px solid var(--line);border-radius:16px;overflow:hidden}.home-page .news-card.featured-news{grid-column:span 2}.home-page .news-art{height:auto;aspect-ratio:16/9}.home-page .news-art:has(img):after{display:none}.home-page .news-copy{padding:18px}.home-page .news-copy time{display:block;font-size:11px;margin:8px 0}.home-page .news-copy h3{font-size:20px;margin:8px 0;line-height:1.25}.home-page .news-copy p{font-size:13px;line-height:1.5}.home-page .team-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.home-page .team-card{padding:14px;border-radius:12px;min-width:0}.home-page .team-card strong{font-size:14px}.home-page .team-card small{font-size:10px}.league-banner{background:linear-gradient(100deg,#0b266bcc,#2a2267aa),url('/launch-assets/stadium-blue.png') center 65%/cover;color:#fff;padding:32px 0}.league-banner .shell{display:flex;justify-content:space-between;gap:18px;align-items:center}.league-banner strong{font-size:24px;letter-spacing:.06em}.league-banner span{font-size:13px;line-height:1.5}.home-page .site-footer{margin:0;padding:24px 0}.home-page .footer-inner{flex-wrap:wrap}.home-page .site-footer nav{gap:18px}.home-page .site-footer nav a{font-size:12px}
@media(max-width:1100px){.home-page .main-nav{display:none;position:absolute;top:100%;left:0;right:0;background:var(--panel);border-bottom:1px solid var(--line);padding:16px;z-index:10}.home-page .main-nav.open{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.home-page .main-nav a{font-size:14px;padding:12px;background:var(--panel2);border-radius:8px}.home-page #menu-button{display:block;order:3;font-size:12px;padding:10px}.home-page .header-inner{gap:10px}.home-page .header-actions{margin-left:auto}.home-page .home-match-layout{grid-template-columns:1.25fr 1fr}.home-page .cards-grid{grid-template-columns:repeat(2,1fr)}.home-page .team-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:740px){.home-page .shell{width:calc(100% - 28px)}.home-page .header-inner{min-height:68px;flex-wrap:nowrap;gap:5px}.home-page .brand img{width:38px;height:38px}.home-page .brand{gap:7px}.home-page .brand strong{font-size:26px}.home-page .brand small{display:none}.home-page .header-actions .button{font-size:11px;padding:8px}.home-page .compact-theme{font-size:11px;padding:9px 8px!important}.home-page #menu-button{font-size:11px;padding:9px}.home-page .main-nav.open{grid-template-columns:repeat(2,1fr)}.home-page .home-hero{min-height:375px}.home-hero-image{object-position:62% center}.home-hero:after{background:linear-gradient(90deg,#031842cc,#03184244)}.home-hero-inner{padding:34px 4px}.home-page .home-hero h1{font-size:76px;margin-top:15px}.home-page .home-hero h2{font-size:21px;max-width:265px}.home-page .home-hero p{font-size:13px;max-width:260px}.hero-motto{display:none}.home-page .home-match-layout{grid-template-columns:1fr}.home-page .section-heading h2{font-size:22px}.home-page .cards-grid{gap:8px}.tournament-tile{padding:12px 9px;gap:8px}.tournament-tile img{width:32px;height:38px}.tournament-tile strong{font-size:13px}.tournament-tile>b{display:none}.home-box,.home-page .standings-card{padding:14px}.home-page .result-card{padding:11px}.home-scoreline{grid-template-columns:1fr 34px 1fr;gap:4px}.home-scoreline img{width:42px;height:42px}.home-scoreline strong{font-size:11px}.home-scoreline>b{font-size:16px}.home-page .news-grid{grid-template-columns:1fr}.home-page .news-card.featured-news{grid-column:auto}.home-news-layout:has(.ad-slot:not([hidden])){display:block}.home-page .team-grid{grid-template-columns:repeat(2,1fr)}.home-page .team-card{gap:8px;padding:10px}.home-page .team-card img{width:36px;height:40px}.home-page .section{margin:24px auto}.league-banner .shell{display:block}.league-banner strong{display:block;font-size:20px;margin-bottom:12px}.home-page .footer-inner{gap:16px}.home-page .footer-inner>span{font-size:11px}}
@media(max-width:370px){.home-page .brand strong{display:none}.home-page .results-grid{grid-template-columns:1fr}.home-scoreline img{width:58px;height:58px}.home-scoreline strong{font-size:13px}.home-page .header-inner{gap:6px}.home-page .team-grid{grid-template-columns:1fr}}

/* Compact fixtures keep the score and full team names together on phones. */
.home-scoreline>b{white-space:nowrap}.tournament-trophy{width:38px;height:45px;flex-shrink:0;color:var(--accent)}
.home-page .standings-card table{width:100%;min-width:0!important}.home-page .standings-card td:first-child{color:var(--text)}
.shell-session{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
@media(max-width:740px){.shell-session{display:none}.home-page .standings-card :is(td,th){padding:10px 3px;font-size:11px}.home-page .standings-card td:nth-child(2){width:42%}.home-page .standings-card td:nth-child(2) a{gap:5px}}
@media(max-width:480px){.home-page .results-grid{grid-template-columns:1fr}.home-scoreline{grid-template-columns:minmax(0,1fr) 68px minmax(0,1fr)}.home-scoreline img{width:58px;height:58px}.home-scoreline strong{font-size:14px}.home-scoreline>b{font-size:25px}}

.rlf-header-actions{max-width:100%;flex-wrap:wrap}.rlf-header #refresh{min-width:44px}

/* Final launch artwork: preserve both supplied compositions and readable text. */
.home-page .home-hero{width:100%;min-width:0;min-height:420px;aspect-ratio:1536/675;display:flex;align-items:center;background:#06132d}
.home-page .home-hero-image{object-position:center;object-fit:cover}
.home-page .home-hero:after{background:linear-gradient(90deg,#041027ed 0%,#0410279e 24%,#04102712 47%,transparent 62%)}
.home-page .home-hero-inner{padding:36px 0}
.home-page .home-hero h1{font-size:clamp(64px,7vw,108px)}
.home-page .home-hero h2{max-width:32%;font-size:clamp(22px,2.05vw,30px);text-wrap:balance}
.home-page .home-hero p{max-width:32%;text-shadow:0 1px 8px #041027}
.home-page .league-banner{position:relative;padding:0;background:#06132d;overflow:hidden;border-top:1px solid #31557e}
.league-banner-image{display:block;width:100%;height:auto;aspect-ratio:3/1}
.home-page .league-banner .shell{position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);width:44%;display:flex;flex-direction:column;gap:16px;text-align:center;text-shadow:0 2px 16px #031021}
.home-page .league-banner strong{font-size:clamp(20px,2.3vw,36px);line-height:1.15;letter-spacing:.045em;text-wrap:balance}
.home-page .league-banner span{font-size:clamp(12px,1.1vw,16px);line-height:1.6;color:#dbe9ff}
@media(max-width:1000px){
 .home-page .home-hero{display:block;min-height:0;aspect-ratio:auto}
 .home-page .home-hero-image{position:relative;inset:auto;display:block;width:100%;height:auto;aspect-ratio:1536/675}
 .home-page .home-hero:after{display:none}
 .home-page .home-hero-inner{padding:22px 4px 28px}
 .home-page .home-kicker{font-size:10px;color:#7fdcf2}
 .home-page .home-hero h1{font-size:56px;margin:10px 0 6px}
 .home-page .home-hero h2{font-size:22px;max-width:100%;margin-bottom:10px}
 .home-page .home-hero p{font-size:14px;max-width:100%;margin-bottom:18px}
 .home-page .league-banner .shell{position:relative;left:auto;top:auto;transform:none;width:calc(100% - 36px);padding:20px 0 24px;gap:8px}
 .home-page .league-banner strong{font-size:22px;margin:0}
 .home-page .league-banner span{font-size:13px}
}

.home-page .cards-grid>.empty,.home-page .results-grid>.empty,.home-page .team-grid>.empty,.home-page .news-grid>.empty{grid-column:1/-1}

/* Manual date entry with native calendar access. */
.rlf-date-editor{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:6px;width:100%;min-width:0;align-items:center}.rlf-date-editor input{min-width:0;max-width:100%;box-sizing:border-box;min-height:44px}.rlf-date-editor .rlf-date-text{width:100%}.rlf-date-editor .rlf-date-picker{width:48px;padding:8px;color:transparent;overflow:hidden}.rlf-date-picker::-webkit-datetime-edit{display:none}.rlf-date-picker::-webkit-calendar-picker-indicator{margin:0;width:24px;height:24px;cursor:pointer}.rlf-date-text[aria-invalid=true]{border-color:#d33253} 

/* Calendar admin: compact, scrollable navigation on narrow screens. */
.admin-ui :is(.rlf-admin-sidebar,#admin-navigation) :is(a,button)>b{flex:0 0 2.4em;white-space:nowrap;word-break:normal}
@media(max-width:740px){
 .admin-ui :is(.rlf-admin-sidebar.open,#admin-navigation.mobile-open){max-height:65dvh;overflow-y:auto;overscroll-behavior:contain;grid-template-columns:1fr}
 .admin-ui .rlf-admin-sidebar a,.admin-ui #admin-navigation .side-link{padding:12px;min-height:44px;gap:10px;font-size:15px;line-height:1.35}
 .admin-ui .rlf-header{flex-wrap:wrap}.admin-ui .rlf-header-actions{flex:1 1 100%;justify-content:flex-end}
 .admin-ui .rlf-admin-layout,.calendar-admin main{min-width:0}.calendar-admin .calendar-grid>*{min-width:0}
 .admin-ui .topbar .brand-name{max-width:170px;overflow-wrap:normal;word-break:normal;line-height:1.25}
}

/* Admin controls share one compact responsive layout across all modules. */
body.admin-ui .rlf-header{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 16px;}
body.admin-ui .rlf-header .rlf-header-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0;}
body.admin-ui .rlf-header :is(button,a.action){box-sizing:border-box;font:600 14px/1.2 system-ui;min-height:44px;padding:10px 12px;border-radius:12px;white-space:normal;text-align:center;}
body.admin-ui .rlf-admin-sidebar a{overflow-wrap:anywhere;line-height:1.35;}
body.admin-ui :is(input,select,textarea){box-sizing:border-box;max-width:100%;min-width:0;}
body.admin-ui :is(form,fieldset,.field,.panel){min-width:0;}
body.admin-ui fieldset{margin-inline:0;}
body.admin-ui #report{overflow-x:auto;}
@media(max-width:600px){
 body.admin-ui .rlf-header .rlf-brand{flex:1;min-width:0;}
 body.admin-ui .rlf-header .rlf-brand img{width:40px;height:40px;}
 body.admin-ui .rlf-header .rlf-brand b{font-size:24px;}
 body.admin-ui .rlf-header .rlf-header-actions{flex:1 0 100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;}
 body.admin-ui .rlf-header .rlf-header-actions>*{width:100%;min-width:0;}
 body.admin-ui .rlf-admin-sidebar.open{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:65dvh;overflow-y:auto;margin-bottom:16px;}
 body.admin-ui .rlf-admin-sidebar a{font-size:13px;padding:10px 8px;gap:6px;}
 body.admin-ui .rlf-admin-layout{padding:12px;}
 body.admin-ui main h1{font-size:clamp(24px,7vw,34px);overflow-wrap:anywhere;}
 body.admin-ui .panel{padding:16px;}
 body.admin-ui :is(.export-controls,.filter-line){display:flex;flex-direction:column;align-items:stretch;}
}
/* Administration: one responsive layout for desktop and touch devices. */
body.admin-ui main{width:min(1440px,100%);margin-inline:auto;padding:clamp(12px,2vw,28px);box-sizing:border-box}
body.admin-ui :is(form,fieldset,.panel,.field,.qm-team){min-width:0;box-sizing:border-box}
body.admin-ui :is(input,select,textarea){max-width:100%;box-sizing:border-box;font-size:16px}
body.admin-ui :is(button,.action){min-height:44px;white-space:normal;overflow-wrap:anywhere}
body.admin-ui :is(button,input,select,textarea,a):focus-visible{outline:3px solid #0284c7;outline-offset:3px}
.qm-squad-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.qm-roster{max-height:440px;overflow:auto;margin-block:12px}.qm-player{display:flex!important;align-items:center;gap:12px;padding:10px;border-bottom:1px solid #b5c8d440}.qm-player[hidden]{display:none!important}.qm-player input{width:22px!important;height:22px!important;flex:0 0 22px}.qm-tabs{display:flex;gap:6px;flex-wrap:wrap}.qm-tabs button{flex:1 1 120px}.qm-tabs [aria-current=page]{background:#123e66;color:#fff}.qm-event-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
@media(max-width:700px){.qm-squad-grid{grid-template-columns:1fr}.qm-event-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.qm-tabs button{flex-basis:28%;font-size:14px}body.admin-ui .qm-sticky{position:static}body.admin-ui :is(.protocol-tools,.round-editor-actions){display:flex;flex-wrap:wrap;gap:8px}body.admin-ui :is(.protocol-tools,.round-editor-actions)>*{flex:1 1 140px}body.admin-ui dialog{width:calc(100% - 24px);max-height:90dvh;box-sizing:border-box}body.admin-ui :is(h1,h2){overflow-wrap:anywhere}body.admin-ui fieldset{margin-inline:0}body.admin-ui legend{max-width:100%;white-space:normal}}
.admin-checklist{display:grid;gap:8px}.admin-checklist>div{max-height:320px;overflow:auto;border:1px solid #aac0d0;border-radius:10px}.admin-checklist label{display:flex!important;gap:10px;align-items:center;padding:10px;margin:0!important;border-bottom:1px solid #aac0d033}.admin-checklist label[hidden]{display:none!important}.admin-checklist input[type=checkbox]{width:22px!important;height:22px;flex:0 0 22px}
.qm-played{display:flex;align-items:center;gap:10px;padding:6px 12px 12px 44px;font-size:14px}.qm-played input{width:20px!important;height:20px}.qm-played[hidden]{display:none!important}
body.admin-ui select[multiple][hidden]{display:none!important}
/* Canonical shell: identical navigation on core, matchday and media pages. */
html body.unified-admin>header.rlf-header{position:relative;inset:auto;display:flex;align-items:center;gap:16px;width:100%;max-width:none;margin:0;padding:12px 20px;box-sizing:border-box;background:var(--panel,#fff);border-bottom:1px solid var(--line,#cbd8e0);z-index:20;font-family:system-ui,sans-serif}
html body.unified-admin .rlf-header .rlf-brand{display:flex;align-items:center;flex:0 0 auto;gap:10px;padding:0;text-decoration:none;color:var(--text,#122b4c)}
html body.unified-admin .rlf-brand img{width:42px;height:42px;object-fit:contain}
html body.unified-admin .rlf-brand b{font:800 26px/1.1 system-ui,sans-serif}
html body.unified-admin .rlf-brand small{display:none}
html body.unified-admin .rlf-header-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}
html body.unified-admin .rlf-header-actions :is(a,button){position:static;display:flex;justify-content:center;align-items:center;flex:0 1 auto;width:auto;min-width:44px;min-height:44px;margin:0;padding:10px 12px;border:1px solid var(--line,#cadce7);border-radius:10px;background:var(--panel2,#eaf4fc);color:var(--text,#122b4c);font:600 14px/1.25 system-ui,sans-serif;text-decoration:none;white-space:normal;overflow-wrap:normal;box-sizing:border-box}
html body.unified-admin .rlf-admin-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:20px;width:100%;max-width:1680px;margin:auto;padding:20px;box-sizing:border-box;align-items:start}
html body.unified-admin .rlf-admin-sidebar{position:sticky;top:16px;display:grid;grid-template-columns:1fr;gap:4px;width:100%;min-width:0;max-height:calc(100dvh - 32px);overflow-y:auto;margin:0;padding:10px;box-sizing:border-box;border:1px solid var(--line,#cadce7);border-radius:14px;background:var(--panel,#fff);box-shadow:none;transform:none}
html body.unified-admin .rlf-admin-sidebar .side-link{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;margin:0;padding:10px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--text,#122b4c);text-align:left;text-decoration:none;font:500 14px/1.35 system-ui,sans-serif;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
html body.unified-admin .rlf-admin-sidebar .side-link b{flex:0 0 24px;color:var(--accent,#287f9e);font:600 12px/1.3 system-ui,sans-serif}
html body.unified-admin .rlf-admin-sidebar .side-link:is(.active,[aria-current=page],:hover){background:var(--panel2,#eaf4fc);border-color:var(--line,#cadce7)}
html body.unified-admin .rlf-admin-layout>main{min-width:0;width:100%;margin:0;padding:0}
html body.unified-admin [data-shell-menu]{display:none}
.media-home-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px;margin-top:20px}
.media-home-grid a{display:flex;flex-direction:column;gap:8px;padding:22px;border:1px solid var(--line,#cadce7);border-radius:14px;text-decoration:none;color:var(--text,#122b4c);background:var(--panel2,#eaf4fc)}
.media-home-grid strong{font-size:20px}.media-home-grid span{font-size:14px;line-height:1.5;color:var(--muted,#537080)}
html body.media-admin .tabs{position:static;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:0 0 16px;overflow:visible}
html body.media-admin .tabs .tab{flex:0 1 auto;font:600 14px/1.3 system-ui,sans-serif;min-height:44px;padding:10px 14px}
html body.media-admin :is(#media-home,#media-back)[hidden]{display:none!important}
#media-back{display:inline-flex;margin:0 0 16px}#tab-players>input,#tab-players>select{display:block;width:100%;max-width:600px;margin:8px 0 16px}
@media(max-width:1000px){
 html body.unified-admin [data-shell-menu]{display:flex}
 html body.unified-admin .rlf-admin-caption,html body.unified-admin .shell-session{display:none}
 html body.unified-admin .rlf-admin-layout{display:block;padding:14px}
 html body.unified-admin .rlf-admin-sidebar{display:none;position:static;max-height:55dvh;margin:0 0 16px}
 html body.unified-admin .rlf-admin-sidebar.open{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 html body.home-page .site-header .header-inner{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:12px 0;height:auto;min-height:0;position:relative}
 html body.home-page .site-header .brand{position:static;width:max-content;max-width:100%;margin:0;transform:none}
 html body.home-page .site-header .brand strong{display:block;font-size:26px}
 html body.home-page .site-header .brand img{width:40px;height:40px}
 html body.home-page .site-header .header-actions{position:static;display:grid;grid-template-columns:44px minmax(60px,1fr) minmax(110px,1.6fr) minmax(60px,1fr);gap:6px;min-width:0;width:100%;margin:0;transform:none}
 html body.home-page .site-header .header-actions>*{position:static!important;display:flex;align-items:center;justify-content:center;min-width:0;width:100%;min-height:44px;height:auto;margin:0!important;padding:9px 6px!important;box-sizing:border-box;font:600 13px/1.25 system-ui,sans-serif!important;white-space:normal;transform:none!important}
 html body.home-page .site-header #rlf-search-open{grid-column:1;grid-row:1}
 html body.home-page .site-header .header-actions>a{grid-column:2;grid-row:1}
 html body.home-page .site-header [data-theme-toggle]{grid-column:3;grid-row:1}
 html body.home-page .site-header #menu-button{grid-column:4;grid-row:1}
 html body.home-page .site-header .main-nav{position:static;grid-row:3;width:100%;max-height:55dvh;overflow:auto;margin:0;box-sizing:border-box}
}
@media(max-width:600px){
 html body.unified-admin>header.rlf-header{padding:12px;gap:10px}
 html body.unified-admin .rlf-header-actions{display:flex;flex:1 1 100%;margin:0;gap:6px}
 html body.unified-admin .rlf-header-actions>*{flex:1 1 80px}
 html body.unified-admin .rlf-admin-sidebar .side-link{padding:9px 7px;font-size:13px;gap:6px}
 html body.media-admin .tabs{display:none}
 html body.home-page .site-header .header-actions .rlf-search-button-label{display:none}
}
@media(max-width:350px){html body.home-page .site-header .header-actions{grid-template-columns:repeat(2,minmax(0,1fr))}html body.home-page .site-header .header-actions>*{grid-column:auto!important;grid-row:auto!important}html body.unified-admin .rlf-admin-sidebar.open{grid-template-columns:1fr}}

/* Four shared actions retain their order and size across all admin routes. */
html body.unified-admin .rlf-header-actions>a{order:1}html body.unified-admin [data-shell-menu]{order:2}html body.unified-admin .rlf-header-actions [data-theme-toggle]{order:3}html body.unified-admin #logout{order:4}
.media-refresh{margin:0 0 14px}
@media(max-width:600px){html body.unified-admin .rlf-header-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}html body.unified-admin .rlf-header-actions>*{width:100%;min-width:0}}
@media(max-width:600px){html body.unified-admin .rlf-header .rlf-header-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%;flex-basis:100%}html body.unified-admin .rlf-header .rlf-header-actions>*{width:100%;max-width:none;min-width:0}}
html[data-theme=dark] body.unified-admin :is(.rlf-header-actions button,.rlf-header-actions a,.media-refresh,#media-back,#export-png){background:#1b2c47!important;color:#edf5ff!important;border:1px solid #4a6485!important}

/* Mobile menu must override legacy ID rules on every service. */
@media(max-width:1000px){
 html body.unified-admin :is(#admin-navigation,#rlf-admin-sidebar).rlf-admin-sidebar{display:none!important;position:fixed!important;inset:var(--shell-menu-top,210px) 12px auto!important;width:auto!important;max-height:calc(100dvh - var(--shell-menu-top,210px) - 16px)!important;margin:0!important;padding:8px!important;z-index:80;overflow-y:auto;overscroll-behavior:contain;box-shadow:0 12px 30px #0003}
 html body.unified-admin :is(#admin-navigation,#rlf-admin-sidebar).rlf-admin-sidebar.open{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:3px!important}
 html body.unified-admin :is(#admin-navigation,#rlf-admin-sidebar).rlf-admin-sidebar .side-link{display:flex!important;min-height:44px!important;padding:8px 10px!important;margin:0!important;gap:10px!important;border:1px solid transparent!important;font:500 14px/1.35 system-ui,sans-serif!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important}
 html body.unified-admin :is(#admin-navigation,#rlf-admin-sidebar).rlf-admin-sidebar .side-link b{flex:0 0 24px!important;font:600 12px/1.35 system-ui,sans-serif!important}
 html body.unified-admin :is(#admin-navigation,#rlf-admin-sidebar).rlf-admin-sidebar .side-link[aria-current=page]{background:var(--panel2)!important;border-color:var(--line)!important}
}
/* Keep round actions in layout and names readable inside field cards. */
html body.round-lineup-page .round-export-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
html body.round-lineup-page .round-export-links>.action{display:flex;align-items:center;justify-content:center;flex:1 1 220px;min-width:0;min-height:44px;margin:0;padding:12px;box-sizing:border-box;text-align:center;white-space:normal;overflow-wrap:normal;line-height:1.4;text-decoration:none}
html body.round-lineup-page .round-pitch .round-slot-button{width:100%;min-width:0;padding:6px!important;gap:4px;font:600 12px/1.3 system-ui,sans-serif!important;white-space:normal;overflow-wrap:normal;word-break:normal;box-sizing:border-box}
html body.round-lineup-page .round-slot-button strong{display:block;width:100%;font-size:12px;line-height:1.35;overflow-wrap:normal;word-break:normal;background:transparent}
html body.round-lineup-page .round-slot-button .round-player-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.round-lineup-page .round-slot-button .round-honour{display:inline-block;white-space:nowrap}
html body.round-lineup-page .round-pitch .pitch-player small{font:500 10px/1.3 system-ui,sans-serif;overflow-wrap:normal;word-break:normal}
@media(max-width:600px){html body.round-lineup-page .round-export-links{display:grid;grid-template-columns:minmax(0,1fr)}html body.round-lineup-page .round-editor-actions{display:grid;grid-template-columns:minmax(0,1fr)}html body.round-lineup-page .round-editor-actions button{width:100%;margin:0}}

html body.round-lineup-page .round-pitch .pitch-player{transform:translate(-50%,-50%)}
html body.round-lineup-page .round-slot-button .round-player-name{font:600 11px/1.3 system-ui,sans-serif}
html body.round-lineup-page .round-avatar img[hidden]{display:none!important}
html body.round-lineup-page .round-avatar.avatar-unavailable:before{content:attr(data-initials);display:grid;place-items:center;width:100%;height:100%;font:700 12px system-ui,sans-serif;color:var(--accent);background:var(--panel2);border-radius:8px}

/* Keep admin content and previews within the viewport. */
.admin-ui main,.admin-ui .panel,.admin-ui .content,.rlf-admin-layout>*{min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:600px){.admin-ui main{overflow-wrap:anywhere}.admin-ui canvas{max-width:100%;height:auto}}

/* P3 actual interactive targets, no global layout reset or overflow masking. */
:is(button,a[href],input,select,textarea,summary):focus-visible{outline:3px solid var(--accent,#165aca);outline-offset:3px}
@media(max-width:740px){
 :is(.rlf-header-actions,.header-actions,.tabs,.rlf-search-tabs,.directory-pages,.protocol-tools,.tor-view-switch,.tor-download-actions,.toolbar,.png-bg-controls,.stats-export-controls) :is(button,select,a[href]){min-height:44px;min-width:44px}
 .rlf-header :is(button,.action),.home-page .header-actions button{min-height:44px;min-width:44px}
 :is(.rlf-public-nav,.main-nav,.rlf-admin-sidebar,.directory-pages) a[href]{display:inline-flex;align-items:center;min-height:44px;min-width:44px}
 .rlf-search-tabs button{min-height:44px;min-width:44px}
 .rlf-cookie-link{min-height:44px!important}
 label:has(>input:is([type=checkbox],[type=radio])){min-height:44px;min-width:44px;cursor:pointer}
}

@media(max-width:740px){
 .rlf-brand{min-height:44px}
 main :is(summary,.tor-intro nav a,.pitch-player>a,.rating-profile a,.hero-links a,.profile-links a,.discipline-profile a,.match-squad a,.squad-list a,.match-timeline a){min-height:44px;min-width:44px;display:inline-flex;align-items:center}
 .home-page :is(.section-heading,.section-head,footer) a[href]{min-height:44px;min-width:44px;display:inline-flex;align-items:center}
 .competition-form a,.competition-next{min-width:44px;min-height:44px}
 .competition-form{gap:4px}
}

@media(max-width:740px){main a[href],footer a[href]{min-height:44px;min-width:44px;display:inline-flex;align-items:center}header .brand{min-height:44px}.competition-form a{width:44px;height:44px}}
