@font-face{font-family:Continuum;src:url('legacy/fonts/contb.ttf') format('truetype');font-weight:700;font-display:swap}
:root{font-family:system-ui,Arial,sans-serif;color:#18261d;background:#111;--red:#be1e3c;--line:#d5ded3}*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:radial-gradient(ellipse at 80% 0,#442431,transparent 60%),#111}button,input,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:9px;padding:11px 16px;background:white;color:#111;min-height:44px}button:disabled{opacity:.5;cursor:not-allowed}h1,h2,h3,button,summary{font-family:Continuum,system-ui,sans-serif;font-weight:700;text-transform:uppercase}header{position:relative;z-index:60000;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background:#14241a;gap:24px}#brand img{display:block;width:190px;height:58px;object-fit:contain}#actions{position:relative;margin-left:auto}summary{list-style:none;cursor:pointer;background:var(--red);color:white;padding:11px 16px;border-radius:9px}summary::-webkit-details-marker{display:none}#actionsPanel{position:absolute;right:0;top:calc(100% + 8px);width:min(280px,calc(100vw - 24px));max-height:calc(100dvh - 110px);overflow:auto;background:white;border-radius:12px;box-shadow:0 8px 24px #0004}#contextActions,nav{display:flex;flex-direction:column;gap:7px;padding:12px}#contextActions:empty{display:none}nav{border-top:1px solid var(--line)}nav button,.primary{background:var(--red);color:white;border-color:var(--red)}#actionsPanel button{text-align:left;width:100%}.save{background:#326b2a!important;color:white!important}.highlight{background:#ffd400!important;color:#111!important}.danger{color:#be1e3c}#notice{flex-shrink:0;padding:10px 24px;background:#fff2c7;font-size:14px;max-height:110px;overflow:auto}#notice[data-level=error]{background:#ffd9dd}#content{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;width:100%;margin:0 auto;padding:46px 24px 52px;color:white}#content[hidden],#frames[hidden]{display:none}#frames{flex:1;min-height:0;display:flex}iframe{border:0;width:100%;height:100%;min-height:0;flex:1;background:white}iframe[hidden]{display:none}.dashboard{max-width:1072px;margin:auto}.dashboard>h1{font-size:48px;margin:0 0 28px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.entry{max-width:760px}.entry>h1{font-size:30px}.entry .grid{grid-template-columns:repeat(2,minmax(0,1fr))}.card{position:relative;isolation:isolate;overflow:hidden;min-height:300px;border-radius:14px;padding:24px;display:flex;flex-direction:column;align-items:flex-start;background:#14241a}.card::before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(#0006,#0003 45%,#000a)}.card::after{content:'';position:absolute;inset:0;padding:1px;border-radius:inherit;background:linear-gradient(135deg,var(--edge,#48ee78),#ffffff29 48%,var(--edge,#48ee78));mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;pointer-events:none}.card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;opacity:.65}.card h2{font-size:33px;margin-top:0;text-shadow:0 1px 3px #0008}.card>button{margin-top:auto}.card.fan{--edge:#d7dadd}.card.comp{--edge:#eeb638}.back{display:block;background:transparent;color:white;border:0;margin-top:22px;padding-left:0}.fan-sticky{position:sticky;top:-46px;z-index:10;background:#111;padding:14px 0;margin-bottom:14px}.fan-sticky h1{margin:0}.filters{display:flex;gap:12px;margin:14px 0 0}.filters label{flex:1;min-width:0}input,select{padding:10px;border:1px solid #a9b9a7;border-radius:7px;max-width:100%;font-family:system-ui,sans-serif;font-size:16px}.filters input,.filters select{display:block;width:100%;margin-top:5px}.catalog{display:grid;gap:10px}.team{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px;background:#fff;color:#18261d;border:1px solid var(--line);border-radius:10px}.team small{display:block;font-size:12px;line-height:1.7}.team strong{font-size:16px}.team .buttons{display:flex;flex-wrap:wrap;gap:8px}.tag{display:inline-block;padding:3px 8px;margin:5px 5px 0 0;font-size:12px;background:#eaf1e5;border-radius:5px}.panel{background:white;color:#18261d;border-radius:14px;padding:24px;max-width:1000px;margin:auto}.panel p{line-height:1.6}.panel label{display:block;margin:14px 0}.panel .buttons{display:flex;gap:10px;flex-wrap:wrap}dialog{border:1px solid var(--line);border-radius:15px;width:min(860px,95vw);max-height:90dvh;padding:25px;color:#18261d;overflow:auto}dialog::backdrop{background:#12221999}.close{float:right;font-family:system-ui,sans-serif}.dialog-scroll{overflow:auto;max-height:60dvh}table{width:100%;border-collapse:collapse}td,th{padding:8px;border-bottom:1px solid var(--line);text-align:left}th{position:sticky;top:0;background:#eaf1e5}input[type=checkbox]{width:21px;height:21px;accent-color:#326b2a}.error{color:#a31933;white-space:pre-wrap}.form-row{display:flex;gap:10px;align-items:center;margin:12px 0;flex-wrap:wrap}.form-row label{flex:1;min-width:120px}.form-row input,.form-row select{width:100%}#loading{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2147483647;background:#ffffffe0;border-radius:30px;padding:13px 17px;display:flex;gap:7px;pointer-events:none;box-shadow:0 2px 12px #0002}#loading[hidden]{display:none}#loading i{width:8px;height:8px;background:#be1e3c;border-radius:50%;animation:dot 1s infinite}#loading i:nth-child(2){animation-delay:.15s}#loading i:nth-child(3){animation-delay:.3s}@keyframes dot{0%,70%,100%{opacity:.4;transform:translateY(0)}35%{opacity:1;transform:translateY(-5px)}}@media(prefers-reduced-motion:reduce){#loading i{animation:none}}@media(max-width:650px){header{padding:8px 12px;gap:8px}#brand img{width:140px;height:40px}#content{padding:30px 12px 40px}.grid,.entry .grid{grid-template-columns:1fr}.dashboard>h1{font-size:40px}.entry>h1{font-size:30px}.card{min-height:250px;padding:22px}.team{align-items:stretch;flex-direction:column}.team .buttons button{flex:1}.fan-sticky{top:-30px}.filters{gap:6px}.filters label{font-size:12px}dialog{padding:14px}.panel{padding:18px}#actionsPanel{max-height:calc(100dvh - 80px)}}

header.with-scoreboard{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:16px;padding-top:8px;padding-bottom:8px}
#headerScoreboard[hidden]{display:none}
#headerScoreboard{display:grid;grid-template-columns:auto auto auto auto auto;align-items:center;justify-content:center;gap:2px 10px;color:white;text-align:center;font-weight:700}
#headerScoreboard .top-team-stack{display:flex;flex-direction:column;align-items:center;gap:3px}
#headerScoreboard img{height:30px;max-width:48px;object-fit:contain}
#headerScoreboard .top-score{font-size:27px;cursor:pointer}
#headerScoreboard .top-period{font-size:15px}
#headerScoreboard .top-timer{grid-column:1/-1;font-size:23px;line-height:1}
#headerScoreboard .top-team-fouls{display:flex;gap:3px;cursor:pointer}
#headerScoreboard .foul-line{display:block;width:13px;height:5px;border:1px solid #aaa;border-radius:2px;background:white}
#headerScoreboard .foul-line.active{background:#be1e3c}
@media(max-width:650px){header.with-scoreboard{grid-template-columns:70px minmax(0,1fr) 65px;gap:5px;padding:6px 8px}.with-scoreboard #brand img{width:70px;height:36px}.with-scoreboard summary{padding:10px 7px;font-size:13px}#headerScoreboard{gap:1px 4px}#headerScoreboard img{height:23px;max-width:30px}#headerScoreboard .top-score{font-size:20px}#headerScoreboard .top-period{font-size:11px}#headerScoreboard .top-timer{font-size:18px}#headerScoreboard .foul-line{width:7px;height:4px}#headerScoreboard .top-team-fouls{gap:2px}}

/* Larger live scoreboard, preserving the shared header layout. */
#headerScoreboard{gap:3px 13px}
#headerScoreboard img{height:39px;max-width:62px}
#headerScoreboard .top-score{font-size:35px}
#headerScoreboard .top-period{font-size:20px}
#headerScoreboard .top-timer{font-size:30px}
#headerScoreboard .foul-line{width:17px;height:6.5px}
@media(max-width:650px){#headerScoreboard{gap:2px 5px}#headerScoreboard img{height:30px;max-width:39px}#headerScoreboard .top-score{font-size:26px}#headerScoreboard .top-period{font-size:14px}#headerScoreboard .top-timer{font-size:23.4px}#headerScoreboard .foul-line{width:9px;height:5.2px}}

#matchUpdates{flex-shrink:0;width:100%;background:#fff;z-index:50000;box-shadow:0 2px 7px #0002}
#matchUpdates[hidden],#matchEvent[hidden]{display:none}
#matchEvent{display:block;width:100%;margin:0;border:0;border-radius:0;background:#fff;color:#000;text-align:center;font:600 14px/1.35 system-ui,sans-serif;text-transform:none;min-height:0;padding:8px 16px;max-height:100px;overflow:auto}
#matchTeams{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:7px 12px;max-width:1150px;margin:auto}
#matchTeams button{width:100%;min-width:0;min-height:42px;border:1px solid #ccc;font-family:system-ui,sans-serif;font-size:16px;font-weight:800;padding:8px;text-align:center;overflow-wrap:anywhere}
@media(max-width:650px){#matchTeams{padding:6px 8px;gap:6px}#matchTeams button{font-size:13px}#matchEvent{font-size:13px}}

#matchEvent{white-space:pre-line;cursor:default;max-height:150px;font-weight:500}
#matchUndoRow{display:flex;justify-content:center;padding:3px 8px 5px}
#matchUndo{background:#be1e3c;color:#fff;border:0;padding:7px 14px;min-height:34px;font-size:13px}
#headerScoreboard .top-team-stack{display:contents}
#headerScoreboard .top-team-stack-left img{grid-column:1;grid-row:1}
#headerScoreboard .top-team-stack-right img{grid-column:5;grid-row:1}
#headerScoreboard .top-team-stack-left .top-team-fouls{grid-column:1;grid-row:2;justify-content:center;align-self:end;margin-bottom:3px}
#headerScoreboard .top-team-stack-right .top-team-fouls{grid-column:5;grid-row:2;justify-content:center;align-self:end;margin-bottom:3px}
#headerScoreboard .top-score.left{grid-column:2;grid-row:1}
#headerScoreboard .top-period{grid-column:3;grid-row:1}
#headerScoreboard .top-score.right{grid-column:4;grid-row:1}
#headerScoreboard .top-timer{grid-column:2/5;grid-row:2}
#headerScoreboard img{height:52px;max-width:68px}
@media(max-width:650px){header.with-scoreboard{grid-template-columns:clamp(80px,26vw,110px) minmax(0,1fr) 65px}.with-scoreboard #brand img{width:100%;height:46px}#headerScoreboard img{height:40px;max-width:40px}#headerScoreboard{gap:3px 4px}}
@media(max-width:360px){#headerScoreboard .top-score{font-size:22px}#headerScoreboard .top-period{font-size:12px}#headerScoreboard .foul-line{width:6px}#headerScoreboard{column-gap:2px}#headerScoreboard img{height:36px;max-width:32px}}

#headerScoreboard img{justify-self:center}

#matchNotificationRow{width:calc(100% - 24px);max-width:1126px;margin:6px auto 0;display:grid;grid-template-columns:100px minmax(0,1fr);align-items:stretch;gap:14px;background:#fff;border:1px solid #ddd;border-radius:9px;padding:8px}
#matchNotificationRow #matchUndo{align-self:center;min-height:52px;line-height:1.4;padding:8px;font-size:14px}
#matchEvent{padding:0;max-height:none;text-align:right;white-space:normal;align-self:center;min-width:0;font-size:14px}
.event-title{font-weight:800}.event-calculation{line-height:1.5;margin:3px 0}.event-followup{min-height:1.3em;font-weight:600}
#eventDetails{padding:2px 6px;min-height:28px;border:0;background:transparent;text-decoration:underline;font-size:12px}
.calculation-details{margin:20px 0}.calculation-details>div{display:flex;justify-content:space-between;gap:25px;padding:9px 0;border-bottom:1px solid #ddd}.calculation-details dd{font-weight:800;margin:0}
@media(max-width:650px){#matchNotificationRow{width:calc(100% - 16px);grid-template-columns:76px minmax(0,1fr);gap:8px;padding:7px}#matchNotificationRow #matchUndo{font-size:12px;padding:7px 3px}#matchEvent{font-size:12px}#eventDetails{font-size:11px}}

.calculation-details .calculation-total{border-top:2px solid #18261d;font-weight:800}.calculation-details .calculation-roll{font-weight:800}.calculation-roll.success{color:#237533}.calculation-roll.failure{color:#be1e3c}.calculation-details dd{font-variant-numeric:tabular-nums;text-align:right}

#matchNotificationRow #matchUndo{font-size:16.8px}@media(max-width:650px){#matchNotificationRow #matchUndo{font-size:14.4px}}

iframe[data-surface=match],iframe[data-surface=competition]{background:transparent}
.editor-team-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:20px;max-height:55dvh;overflow:auto}.editor-team-choices button{min-height:58px;overflow-wrap:anywhere}@media(max-width:500px){.editor-team-choices{grid-template-columns:1fr}}
.identity-page{max-width:1080px;margin:auto}.identity-page>h1{font-size:38px;margin:0 0 12px}.identity-page>p{line-height:1.5}.identity-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:22px;align-items:start}.identity-layout .panel{width:100%;margin:0}.identity-layout label>input{display:block;width:100%;margin-top:7px}.identity-layout small{display:block;line-height:1.5;font-size:12px;margin-top:6px}.identity-colors{display:grid;grid-template-columns:1fr 1fr;gap:18px}.identity-colors input[type=color]{height:54px;padding:5px}.identity-note{font-size:13px}.identity-preview{border:1px solid #ffffff40;border-radius:14px;padding:22px;background:#191919}.identity-preview h2{margin-top:0}.identity-preview p{font-size:14px;line-height:1.5}#identityTeamPreview{padding:20px;display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:14px;align-items:center;border-radius:12px}#identityLogo{width:72px;height:72px;object-fit:contain}#identityPreviewName{overflow-wrap:anywhere}#identityTeamPreview span{font-size:30px;font-weight:900}#identityButtonPreview{border-radius:10px;text-align:center;padding:18px;font:700 20px Continuum,system-ui,sans-serif;overflow-wrap:anywhere}@media(max-width:740px){.identity-layout{grid-template-columns:1fr}.identity-preview{order:-1;padding:16px}.identity-page>h1{font-size:30px}}
.home-extras{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}.home-extras .card{min-height:180px;background:linear-gradient(135deg,#303b35,#14241a);--edge:#be1e3c}.home-extras .card a{margin-top:auto}a.primary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 16px;border-radius:9px;text-decoration:none;font-family:Continuum,system-ui,sans-serif;font-weight:700}nav a.primary{justify-content:flex-start} .academy-page{max-width:1000px;margin:auto}.academy-page h2{font-size:22px}.academy-video{display:block;width:100%;height:auto;aspect-ratio:16/9;background:#000;border-radius:12px;flex:none}.academy-page .buttons{display:flex;flex-wrap:wrap;gap:12px}.academy-page p a{color:white}
@media(max-width:650px){.home-extras{gap:12px}.home-extras .card{padding:16px 12px;min-height:160px}.home-extras .card h2{font-size:24px}.home-extras .card :is(button,a){font-size:16px;padding:10px 12px}.academy-page h1{font-size:32px}.academy-page h2{font-size:18px}}
.fan-team-info{min-width:0;flex:1}.fan-team-identity{display:flex;align-items:center;gap:12px;border-radius:9px;padding:10px;margin-bottom:8px;min-height:64px}.fan-team-identity img,#editorTeamChoices button img{width:48px;height:48px;object-fit:contain;flex:none}.fan-team-identity strong{overflow-wrap:anywhere}#editorTeamChoices button{display:flex;align-items:center;gap:12px;text-align:left}#editorTeamChoices button span{min-width:0;overflow-wrap:anywhere}
#matchNotificationRow{grid-template-columns:100px 110px minmax(0,1fr)}#matchNotificationRow:has(#matchMode[hidden]){grid-template-columns:100px minmax(0,1fr)}#matchMode{align-self:center;background:#ffd400;color:#111;min-height:52px;padding:6px;font-size:14px;white-space:pre-line}#matchMode[hidden]{display:none}@media(max-width:650px){#matchNotificationRow{grid-template-columns:72px 72px minmax(0,1fr);gap:5px}#matchNotificationRow:has(#matchMode[hidden]){grid-template-columns:76px minmax(0,1fr)}#matchMode{font-size:11px;padding:5px}}
body.game-modal-open #frames{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;z-index:100000!important;background:transparent}body.game-modal-open #frames>iframe:not([hidden]){height:100dvh!important}body.game-modal-open>header,body.game-modal-open>#matchUpdates{pointer-events:none}

/* Keep the shared header opaque; fullscreen popups must not reveal it through the frame. */
body>header{background:#14241a!important;background-image:none!important;opacity:1!important;filter:none!important;backdrop-filter:none!important}body.game-modal-open #frames,body.game-modal-open #frames>iframe:not([hidden]){background:#111!important;opacity:1!important}

#settingsLogin{background:#be1e3c!important;color:#fff!important;border-color:#be1e3c!important}#settingsLogin[data-logged="true"]{background:#326b2a!important;border-color:#326b2a!important}#loginCheckNote:empty{display:none}#fullscreen{background:#be1e3c!important;color:#fff!important;border-color:#be1e3c!important}

/* Home: intestazione coordinata con Soccer e accesso rapido alle Impostazioni. */
.home-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 28px}.home-heading h1{font-size:48px;margin:0}.home-settings{flex:0 0 48px;width:48px;height:48px;min-height:48px;padding:0;border-radius:50%;display:grid;place-items:center;background:#fff;color:#111;border:1px solid #d5ded3;font-family:system-ui,Arial,sans-serif!important;font-size:28px;line-height:1;text-transform:none;box-shadow:0 3px 12px #0005}.home-settings:hover,.home-settings:focus-visible{background:var(--red);color:#fff;border-color:var(--red)}
@media(max-width:650px){.home-heading{margin-bottom:22px}.home-heading h1{font-size:40px}.home-settings{flex-basis:44px;width:44px;height:44px;min-height:44px;font-size:25px}}

/* Nella Home la rondella sostituisce AZIONI nella top bar. */
#actions.home-settings-mode>summary{width:48px;height:48px;min-height:48px;padding:0;display:grid;place-items:center;background:transparent;color:#fff;border:0;border-radius:0;box-shadow:none}
#actions.home-settings-mode>summary svg{display:block;width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#actions.home-settings-mode>summary:hover,#actions.home-settings-mode>summary:focus-visible{background:transparent;color:#fff;opacity:.78}
.settings-page{width:100%;max-width:1000px;margin:auto}.settings-page>.panel{margin:0}.settings-page>.back{margin-top:18px}
@media(max-width:650px){#actions.home-settings-mode>summary{width:44px;height:44px;min-height:44px}#actions.home-settings-mode>summary svg{width:30px;height:30px}}

/* Menu contestuali: nessuna navigazione rossa duplicata. */
#actions[hidden]{display:none!important}
#actions.context-only nav{display:none!important}
#actions.context-only #contextActions{padding:12px}
.nav-back{background:#111!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#111!important}
.identity-actions,.selection-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.identity-actions button,.selection-actions button{flex:1;min-width:150px}
