:root{font-family:system-ui,Arial,sans-serif;color:#18261d;background:#f3f6f2;--green:#326b2a;--line:#d5ded3}*{box-sizing:border-box}body{margin:0}header{padding:16px 24px;background:#14241a;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}#brand{color:white;text-decoration:none;font-size:19px;letter-spacing:.05em}#brand b{color:#a7e67b}small{display:block;font-size:12px;font-weight:400;letter-spacing:0;line-height:1.7}nav{display:flex;gap:8px;flex-wrap:wrap}button,.button{font:inherit;font-weight:650;border:1px solid var(--line);border-radius:9px;padding:11px 16px;background:white;color:#18261d;cursor:pointer;text-decoration:none}button:hover{background:#e5f1df}button:disabled{opacity:.45;cursor:not-allowed}nav button{background:transparent;color:white;border-color:#587160}nav button:hover,nav button.active{background:#326b2a}button.primary{background:var(--green);color:white;border-color:var(--green)}button.danger{color:#a42920}#notice{padding:9px 24px;font-size:13px;background:#e8eee5;border-bottom:1px solid var(--line)}#notice[data-level=warning]{background:#fff0c9}#notice[data-level=error]{background:#ffe0dd}main{max-width:1120px;margin:32px auto;padding:0 24px}h1{font-size:32px;margin:0 0 12px}h2{font-size:22px}p{line-height:1.6}.muted{color:#596b5c}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.card{padding:24px;background:white;border:1px solid var(--line);border-radius:14px}.actions{display:flex;gap:9px;flex-wrap:wrap;margin:18px 0}.catalog{display:grid;gap:10px}.team{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px;background:white;border:1px solid var(--line);border-radius:10px}.tag{display:inline-block;margin:5px 5px 0 0;padding:3px 8px;font-size:12px;background:#eaf1e5;border-radius:5px}.team .actions{margin:0}input,select{font:inherit;padding:11px;border:1px solid #a9b9a7;border-radius:7px;max-width:100%}input[type=checkbox]{width:21px;height:21px;accent-color:var(--green)}label{line-height:1.5}.filters{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}.filters input{flex:1}dialog{border:1px solid var(--line);border-radius:15px;width:min(860px,95vw);max-height:90vh;padding:25px}dialog::backdrop{background:#12221999}.close{float:right}.players{width:100%;border-collapse:collapse}.players th,.players td{padding:8px;border-bottom:1px solid var(--line);text-align:left}.players th{position:sticky;top:0;background:#eaf1e5}.selection-summary{position:sticky;bottom:0;background:white;padding:15px 0;border-top:1px solid var(--line)}iframe{display:block;width:100%;height:calc(100dvh - 138px);border:0;background:white}iframe[hidden]{display:none}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.error{color:#a42920}.status-log{max-height:220px;overflow:auto}.frame-context{padding:9px 24px;background:#fff4d8;border-bottom:1px solid #dbceaf}.frame-context button{padding:5px 12px;margin-left:10px}[hidden]{display:none!important}@media(max-width:650px){header{padding:12px;gap:12px}nav{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:6px}nav button{font-size:13px;padding:9px}main{margin:20px auto;padding:0 12px}#notice{padding:9px 12px}.team{align-items:flex-start;flex-direction:column}.card{padding:17px}h1{font-size:27px}.players th,.players td{padding:6px 3px;font-size:12px}dialog{padding:12px}iframe{height:calc(100dvh - 210px)}.frame-context{padding:8px 12px}}

/* Compact mobile navigation: expand only when needed. */
@media(min-width:651px){.mobile-navigation{display:contents}.mobile-navigation>summary{display:none}.mobile-navigation:not([open])>nav{display:flex}}
@media(max-width:650px){
 body:has(iframe:not([hidden])){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
 header{padding:8px 12px;gap:8px;flex-shrink:0;position:relative}
 #brand{font-size:15px}#brand small{display:none}
 .mobile-navigation{margin-left:auto}.mobile-navigation>summary{cursor:pointer;padding:8px 12px;border:1px solid #587160;border-radius:8px;font-weight:650;font-size:14px}
 .mobile-navigation[open]{width:100%;margin:0}.mobile-navigation[open]>summary{width:fit-content;margin-left:auto}.mobile-navigation nav{margin-top:8px}
 #notice{font-size:12px;padding:6px 12px;max-height:72px;overflow:auto;flex-shrink:0}
 #frames{min-height:0;display:flex;flex-direction:column;flex:1}.frame-context{font-size:0;padding:5px 10px;flex-shrink:0}.frame-context button{font-size:12px;margin:0;padding:5px 10px}
 iframe{height:100%;min-height:0;flex:1;width:100%}
}

@font-face{font-family:Continuum;src:url("legacy/fonts/contb.ttf") format("truetype");font-style:normal;font-weight:700;font-display:swap}
#brand{display:flex;align-items:center}#brand img{display:block;width:190px;height:58px;object-fit:contain}
header nav button,.mobile-navigation>summary,.home-dashboard h1,.home-dashboard h2,.home-dashboard button{font-family:Continuum,system-ui,sans-serif;font-weight:700}
.home-dashboard h1{margin-bottom:28px}.home-dashboard .card{display:flex;flex-direction:column;align-items:flex-start}.home-dashboard .card h2{margin-top:0}.home-dashboard .card p{flex:1}.home-dashboard button{font-size:17px}
@media(max-width:650px){#brand img{width:140px;height:40px}.home-dashboard h1{font-size:30px}}
/* Shared typography: display text only, without altering stored names or values. */
:is(h1,h2,h3,h4,h5,h6,button,.button,summary){font-family:Continuum,system-ui,sans-serif!important;font-weight:700!important;text-transform:uppercase}
/* Global surface and brand actions. */
:root{--green:#be1e3c}html,body{background:#111 url("legacy/SFONDO.webp") center top/cover fixed}
button,.button,nav button,nav button.active,.mobile-navigation>summary{background:#be1e3c!important;border-color:#be1e3c!important;color:#fff!important}
button:hover,.button:hover,nav button:hover{background:#a31933!important;border-color:#a31933!important}
button:disabled{opacity:.5}.home-dashboard h1{color:#fff;text-shadow:0 2px 4px #000}
#content>h1,#content>h2,#content>p,#content>label{color:#fff}#content>.filters{color:#fff}
:root{background:#111 url("legacy/SFONDO.webp") center top/cover fixed}body{min-height:100dvh}
/* Let the embedded match scroll while the outer navigation stays in view. */
body:has(iframe[data-surface=match]:not([hidden])){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body:has(iframe[data-surface=match]:not([hidden]))>header,body:has(iframe[data-surface=match]:not([hidden]))>#notice{flex-shrink:0}
body:has(iframe[data-surface=match]:not([hidden])) #frames{display:flex;flex-direction:column;flex:1;min-height:0}
body:has(iframe[data-surface=match]:not([hidden])) iframe{flex:1;min-height:0;height:100%}
/* Shared team picker and confirmation dialogs use normal readable text. */
dialog :is(h1,h2,h3,h4,button,summary){font-family:system-ui,Arial,sans-serif!important;font-weight:650!important;text-transform:none!important}
dialog button{background:#fff!important;color:#18261d!important;border-color:#a9b9a7!important}
dialog button.primary,dialog #saveSelection{background:#326b2a!important;color:#fff!important;border-color:#326b2a!important}
dialog button{border:1px solid #d5ded3!important}
.home-dashboard .plain-back,.academy-page .plain-back,#settingsBack{margin-top:22px;padding:8px 0;background:transparent!important;border:0!important;color:#fff!important;box-shadow:none}
.fan-sticky{position:sticky;top:0;z-index:10;background:#111 url("legacy/SFONDO.webp") center/cover;padding:12px 0;margin-bottom:14px;color:#fff}
.fan-heading{display:flex;align-items:center;gap:20px}.fan-heading h1{margin:0;color:#fff}
.fan-actions{position:relative}.fan-actions>summary{cursor:pointer;background:#be1e3c;color:white;padding:11px 16px;border-radius:9px;list-style:none}
.fan-actions[open]>.actions{position:absolute;top:100%;left:0;min-width:260px;background:white;border:1px solid #d5ded3;border-radius:12px;padding:10px;box-shadow:0 6px 20px #0005;z-index:12}
.fan-actions .actions button,#teamList .actions button{background:#fff!important;color:#000!important;border:1px solid #d5ded3!important}
.fan-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);gap:10px;margin:14px 0 0;flex-wrap:nowrap}
.fan-filters label{min-width:0}.fan-filters :is(input,select){display:block;width:100%;min-width:0;box-sizing:border-box}
@media(max-width:650px){.fan-filters{gap:6px;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) minmax(0,1fr)}.fan-filters label{font-size:12px}.fan-filters :is(input,select){font-size:16px;padding:8px 4px}.fan-heading{gap:12px}.fan-heading h1{font-size:25px}}

#teamList .actions button[data-act="kit"]{background:#ffd400!important;color:#000!important}
#teamList .actions button[data-act="delete"]{background:#be1e3c!important;color:#fff!important}

#settingsLogin{background:#be1e3c!important;color:#fff!important}#settingsLogin[data-logged="true"]{background:#326b2a!important}#loginCheckNote:empty{display:none}

/* Unified context actions at every screen width. */
body>header .mobile-navigation{display:block!important;position:relative;width:auto!important;margin-left:auto!important}
body>header .mobile-navigation>summary{display:list-item!important;width:auto!important;background:#be1e3c;color:#fff;padding:10px 15px;border:0;border-radius:9px;cursor:pointer;font:700 16px SoccerContinuum,Continuum,Arial,sans-serif}
body>header .mobile-navigation:not([open])>nav,body>header .mobile-navigation:not([open])>#contextActions{display:none!important}
body>header .mobile-navigation[open]>nav{display:flex!important;flex-direction:column;position:absolute;right:0;top:100%;width:260px;padding:12px;margin:0;background:#fff;border-radius:0 0 12px 12px;box-shadow:0 10px 20px #0003;z-index:50000}
body>header .mobile-navigation[open]:has(#contextActions:not([hidden]))>nav{top:calc(100% + var(--context-height,0px));border-top:1px solid #d5ded3}
#contextActions:not([hidden]){position:absolute;right:0;top:100%;width:260px;padding:12px;display:flex;flex-direction:column;gap:7px;background:#fff;border-radius:12px 12px 0 0;z-index:50001;box-sizing:border-box}
body>header .mobile-navigation nav{box-sizing:border-box;gap:7px}
body>header .mobile-navigation :is(nav,#contextActions) button{width:100%;background:#fff!important;color:#000!important;border:1px solid #d5ded3!important;text-align:left;font:700 15px Continuum,Arial,sans-serif;padding:10px}
body>header .mobile-navigation #contextActions button.context-save{background:#326b2a!important;color:#fff!important}
body>header .mobile-navigation #contextActions button.context-highlight{background:#ffd400!important}
.fan-actions{display:none!important}
body>header .mobile-navigation nav button{background:#be1e3c!important;color:#fff!important;border-color:#be1e3c!important}body>header{z-index:60000!important} 
body>header:has(#brand) .mobile-navigation nav button[data-page]{background:#be1e3c!important;color:#fff!important;border-color:#be1e3c!important}

body>header .mobile-navigation:not([open])>#unifiedActionsPanel{display:none!important}
#unifiedActionsPanel{position:absolute;right:0;top:calc(100% + 8px);width:min(280px,calc(100vw - 24px));max-height:calc(100dvh - 95px);overflow-y:auto;background:#fff;border-radius:12px;box-shadow:0 8px 24px #0004;z-index:60001}
body>header .mobile-navigation #unifiedActionsPanel :is(nav,#contextActions){position:static!important;top:auto!important;width:100%!important;box-shadow:none!important;border-radius:0!important}
body>header .mobile-navigation #unifiedActionsPanel #contextActions[hidden]{display:none!important}

.home-with-images .card{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;min-height:300px;background:#14241a;border:0;padding:24px}
.home-with-images .home-menu-image{position:absolute;inset:0;z-index:-2;display:block;width:100%;height:100%;object-fit:cover;object-position:center;margin:0;border-radius:inherit;pointer-events:none}
.home-with-images .home-menu-image[hidden]{display:none}
.home-with-images .card::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(0,0,0,.48),rgba(0,0,0,.25) 45%,rgba(0,0,0,.68));pointer-events:none}
.home-with-images .card h2,.home-with-images .card p{color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:0 1px 3px #0008}
.home-with-images .card p{max-width:30ch}
.home-with-images .card>button{margin-top:auto;position:relative}
@media(max-width:650px){.home-with-images .card{min-height:250px;padding:22px}}

.home-with-images>h1{font-size:48px}.home-with-images .card h2{font-size:33px}
.match-dashboard .card{min-height:300px;box-sizing:border-box;border:0;background-size:cover;background-position:center;overflow:hidden}
.match-dashboard .card:has(#newMatch){background-image:linear-gradient(#0007,#0009),var(--menu-art,none)}
.match-dashboard .card:has(#resumeMatch){background-image:linear-gradient(#0007,#0009),var(--menu-art,none)}
.match-dashboard .card p{color:#fff;text-shadow:0 1px 3px #000}
@media(max-width:650px){.home-with-images>h1{font-size:40.5px}.match-dashboard .card{min-height:250px}}

/* Keep navigation visible; embedded screens scroll inside the remaining space. */
body>header{position:sticky;top:0;flex-shrink:0}
.fan-sticky{top:var(--shell-header-height,90px)}
body:has(#frames iframe:not([hidden])){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body:has(#frames iframe:not([hidden]))>#notice{flex-shrink:0}
body:has(#frames iframe:not([hidden])) #frames{display:flex;flex-direction:column;flex:1;min-height:0}
body:has(#frames iframe:not([hidden])) #frames iframe:not([hidden]){flex:1;height:100%;min-height:0;width:100%}
#unifiedActionsPanel{max-height:calc(100dvh - var(--shell-header-height,90px) - 16px)}

/* Fine gradient outlines, independent of background images. */
.home-with-images .card,.match-dashboard .card{position:relative;--card-edge:#48ee78}
.home-with-images .card:has([data-page="teams"]){--card-edge:#d7dadd}
.home-with-images .card:has([data-page="competitions"]){--card-edge:#eeb638}
.home-with-images .card::after,.match-dashboard .card::after{content:"";position:absolute;inset:0;padding:1px;border-radius:inherit;background:linear-gradient(135deg,var(--card-edge),rgba(255,255,255,.16) 48%,var(--card-edge));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;z-index:2}

.match-dashboard .card{display:flex;flex-direction:column;align-items:flex-start}.match-dashboard .card>button{margin-top:auto}

/* Home and match entry share one scroll surface below navigation. */
body:has(#content:not([hidden])>:is(.match-dashboard,.home-with-images)){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body:has(#content:not([hidden])>:is(.match-dashboard,.home-with-images))>#notice{flex-shrink:0}
body:has(#content:not([hidden])>:is(.match-dashboard,.home-with-images))>#frames{display:none}
#content:has(>:is(.match-dashboard,.home-with-images)){flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:46px 0 52px;overflow-y:auto;overflow-x:hidden}
#content>.match-dashboard{width:min(760px,94vw);margin:0 auto}
.match-dashboard>h1{font-size:30px;line-height:normal;margin:0 0 28px}
.match-dashboard>.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.match-dashboard .card{padding:24px;font:16px/1.6 system-ui,Arial,sans-serif}
.match-dashboard .card>button{min-height:44px}
.match-dashboard>.plain-back{min-height:40px}
@media(max-width:650px){.match-dashboard>.grid{grid-template-columns:1fr}}

#content>.home-with-images{width:min(1072px,calc(100% - 48px));margin:0 auto}
@media(max-width:650px){#content>.home-with-images{width:94vw}}
.match-dashboard #resumeMatch,.match-dashboard #resumeMatch:disabled{opacity:1;background:#be1e3c!important;color:#fff!important;border-color:#be1e3c!important}

/* Every shell page owns a scroll area below the fixed navigation. */
body:has(>#content:not([hidden])){height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body:has(>#content:not([hidden]))>#notice{flex-shrink:0}
body:has(>#content:not([hidden]))>#frames{display:none}
#content:not([hidden]){flex:1;min-height:0;width:100%;max-width:1120px;margin:0 auto;padding:32px 24px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
#content:has(>.fan-sticky)>.fan-sticky{top:0}
@media(max-width:650px){#content:not([hidden]){padding:20px 12px}}
/* Preserve the shared entry-card spacing, including Home. */
#content:has(>:is(.match-dashboard,.home-with-images)){max-width:none;padding:46px 0 52px}

#homeSettings{display:none;background:transparent!important;color:#fff!important;border:0;padding:8px;cursor:pointer}
body:has(#content:not([hidden])>.home-with-images)>header .mobile-navigation{display:none!important}
body:has(#content:not([hidden])>.home-with-images)>header #homeSettings{display:inline-flex;margin-left:auto;align-items:center;justify-content:center}

/* Navigation entries share the contextual buttons geometry on every screen. */
body>header .mobile-navigation #unifiedActionsPanel :is(nav,#contextActions){display:flex;flex-direction:column;gap:7px;padding:12px;box-sizing:border-box}
body>header:has(#brand) .mobile-navigation #unifiedActionsPanel :is(nav,#contextActions) button{width:100%;min-height:40px;margin:0;padding:10px;border:1px solid #d5ded3!important;border-radius:9px;box-sizing:border-box}

#content:not([hidden]):has(>.fan-sticky){padding-top:0}

.home-extra-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}
.home-extra-grid .card{min-width:0;--card-edge:#00b7ef;min-height:220px}
.home-extra-grid .card h2{font-size:clamp(20px,4.8vw,33px);overflow-wrap:anywhere}
.home-extra-grid .card button{max-width:100%;font-size:clamp(13px,3.5vw,17px);padding:11px 12px}
.academy-page{max-width:950px;margin:auto;color:white}.academy-page h1,.academy-page .academy-subtitle{color:white!important}
.academy-subtitle{font-weight:700}.academy-page a{color:white}.academy-video{aspect-ratio:16/9;width:100%;background:#111;border-radius:14px;overflow:hidden}
.academy-video iframe{width:100%;height:100%;border:0}.academy-page .plain-back{margin-top:20px}
.academy-guide-dialog{width:min(1000px,96vw);height:90dvh;padding:10px;max-height:94dvh}
.academy-guide-dialog>iframe{width:100%;height:calc(100% - 44px);border:0}.academy-guide-dialog>.close{height:38px;margin-bottom:6px}
@media(max-width:650px){.home-extra-grid{gap:12px;margin-top:18px}.home-extra-grid .card{padding:16px 12px;min-height:190px}.home-extra-grid .card h2{margin-top:0}.academy-page .actions{display:grid;grid-template-columns:1fr}.academy-page h1{font-size:30px}}

.identity-choice{background:var(--team-primary)!important;color:var(--team-text)!important;-webkit-text-fill-color:var(--team-text)!important;border-left:7px solid var(--team-secondary)!important;padding:12px;border-radius:10px}
.identity-choice *{color:inherit!important;-webkit-text-fill-color:inherit!important}.identity-logo{width:44px;height:44px;object-fit:contain;vertical-align:middle;margin-right:12px;flex-shrink:0}
#pickTeams .identity-choice{text-align:left;min-height:64px}.identity-page{max-width:840px;margin:auto}.identity-page>h1,.identity-page>p{color:white}.identity-page .card{color:#111}.identity-page label{display:block;margin:12px 0}.identity-page input:not([type=color]){display:block;width:100%;margin-top:6px}.identity-colors{display:flex;gap:16px;flex-wrap:wrap}.identity-colors input{display:block;width:76px;height:44px;padding:3px}.identity-page #identitySave{background:#326b2a!important}.team>div.identity-choice{min-width:200px;max-width:100%}.team .actions{flex-wrap:wrap}

/* Labels inherit the same team identity background and text. */
.team .identity-choice .tag{background:transparent!important;color:inherit!important;-webkit-text-fill-color:inherit!important}

/* Equal visual identity columns, sized for a team name of roughly 27 characters. */
#teamList .team>div.identity-choice{width:calc(27ch + 80px);min-width:0;max-width:100%;flex:0 0 auto;box-sizing:border-box;overflow-wrap:anywhere}
#teamList .team>.actions{flex:1;justify-content:flex-start}
@media(max-width:650px){#teamList .team>div.identity-choice{width:100%}}

.identity-choice{outline:var(--team-outline,0px) solid #b9b9b9;outline-offset:-1px}

#notice{position:fixed!important;top:auto!important;bottom:12px;left:12px;right:12px;z-index:2147483001;margin:0!important;max-height:30dvh;overflow:auto;border-radius:9px;box-shadow:0 2px 12px #0003}
#notice[hidden]{display:none!important}

#settingsBack{display:block;width:max-content;text-align:left}

/* Keep a white secondary stripe visible without changing the team's colors or size. */
.identity-choice{position:relative}
.identity-choice::before{content:"";display:var(--team-secondary-outline,none);position:absolute;left:-7px;top:0;bottom:0;width:7px;box-sizing:border-box;border:1px solid #b9b9b9;border-radius:10px 0 0 10px;pointer-events:none}

body>header .mobile-navigation.context-menu-hidden{display:none!important}
body>header .mobile-navigation #unifiedActionsPanel nav[hidden]{display:none!important}
body>header .mobile-navigation #contextActions button.context-navigation{background:#000!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#000!important}
