/* Fantaballa — restyling limitato alla parte superiore della stagione */
.season-top-shell{display:grid;gap:16px;margin-bottom:16px;min-width:0}
.season-top-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:hidden;border:2px solid #d8bb49;border-radius:18px;background:#d8bb49;box-shadow:0 12px 30px rgba(4,17,31,.18)}
.season-top-stat{display:flex;min-width:0;min-height:78px;flex-direction:column;justify-content:center;gap:6px;padding:12px 14px;border-right:1px solid rgba(255,255,255,.1);background:linear-gradient(180deg,#173f66,#102d4b);color:#fff}
.season-top-stat:last-child{border-right:0}
.season-top-stat>span{font-size:9px;font-weight:1000;letter-spacing:.11em;text-transform:uppercase;color:#cfe1ef}
.season-top-stat>b{font-family:var(--display-font);font-size:27px;line-height:1;color:#ffe96c;white-space:nowrap}
.season-top-stat>b small{font-size:12px;color:#cfe1ef}
.season-top-form>div{display:flex;align-items:center;gap:5px}
.season-top-form-result{display:grid!important;place-items:center;width:24px;height:24px;border-radius:8px;color:#fff!important;font-size:10px!important;line-height:1!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.2)}
.season-top-form-result.win{background:#1f8a55}.season-top-form-result.loss{background:#c64038}.season-top-form-result.draw{background:#68778a}.season-top-form-result.empty{background:rgba(255,255,255,.1);color:#cfe1ef!important}

.season-top-match{position:relative;overflow:hidden;padding:18px!important;border:2px solid rgba(216,187,73,.9)!important;background:radial-gradient(circle at 50% 0,rgba(255,233,108,.15),transparent 42%),linear-gradient(145deg,#102d4b,#0b2037 72%,#142f4d)!important;box-shadow:0 16px 38px rgba(5,17,29,.25)!important;color:#fff}
.season-top-match::after{content:"";position:absolute;right:-8%;bottom:-180px;left:-8%;height:260px;background:radial-gradient(ellipse,rgba(41,130,90,.3),transparent 67%);pointer-events:none}
.season-top-match-head{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.season-top-match-head span{display:block;font-size:10px;font-weight:1000;letter-spacing:.12em;text-transform:uppercase;color:#bcd2e2}
.season-top-match-head b{display:block;margin-top:4px;font-size:18px;color:#fff7cf}
.season-top-difficulty{padding:7px 12px;border:1px solid rgba(255,233,108,.5);border-radius:999px;background:rgba(255,233,108,.11);color:#ffe96c;font-size:10px;font-weight:1000;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}
.season-top-difficulty.extreme{border-color:rgba(244,112,112,.5);background:rgba(181,57,72,.2);color:#ffd0d0}.season-top-difficulty.hard{border-color:rgba(255,190,91,.45);background:rgba(172,107,29,.18);color:#ffe1a8}.season-top-difficulty.balanced{border-color:rgba(213,111,255,.45);background:rgba(138,75,181,.18);color:#f3d5ff}.season-top-difficulty.favourable{border-color:rgba(83,210,154,.45);background:rgba(48,143,103,.18);color:#c8f7df}
.season-top-matchup{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:14px;align-items:stretch;padding:15px;border:1px solid rgba(255,255,255,.14);border-radius:22px;background:linear-gradient(135deg,rgba(12,37,61,.78),rgba(30,77,111,.68));box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.season-top-team{position:relative;display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:15px;align-items:center;min-height:130px;overflow:hidden;padding:17px 18px 17px 17px;border:1px solid rgba(255,255,255,.25);border-radius:20px;background:linear-gradient(135deg,var(--team-primary),var(--team-secondary));color:var(--team-text,#fff);box-shadow:0 10px 22px rgba(0,0,0,.18)}
.season-top-team-colors{position:absolute;inset:0;background:linear-gradient(115deg,transparent 50%,color-mix(in srgb,var(--team-accent) 62%,transparent));opacity:.55;pointer-events:none}
.season-top-team-badge{position:relative;z-index:1;display:grid;place-items:center;width:68px;height:68px;border:2px solid rgba(255,255,255,.62);border-radius:21px;background:rgba(6,18,31,.24);box-shadow:inset 0 0 0 4px rgba(255,255,255,.11),0 8px 18px rgba(0,0,0,.2);font-family:var(--display-font);font-size:21px;font-weight:1000;letter-spacing:.04em}
.season-top-team-badge--flag{padding:0}
.season-top-team-badge--flag .team-color-dot{width:34px;height:34px;border-radius:10px;border-width:3px;box-shadow:0 5px 12px rgba(0,0,0,.28)}
.season-top-team-copy{position:relative;z-index:1;display:grid;align-content:center;min-width:0;gap:0}
.season-top-team-copy strong{font-family:var(--display-font);font-size:clamp(31px,3.4vw,48px);line-height:.92;text-transform:uppercase;overflow-wrap:anywhere;text-wrap:balance}
.season-top-team-ovr{position:relative;z-index:1;display:flex;align-items:flex-end;justify-content:flex-end;align-self:stretch;gap:6px;min-width:96px;text-align:right;white-space:nowrap}
.season-top-team-ovr span{font-size:clamp(11px,1vw,15px);font-weight:1000;letter-spacing:.08em;text-transform:uppercase;color:#fff7cf;transform:translateY(-8px);text-shadow:0 2px 6px rgba(0,0,0,.25)}
.season-top-team-ovr b{font-family:var(--display-font);font-size:clamp(64px,7vw,98px);line-height:.78;color:rgba(255,255,255,.98);text-shadow:-1px -1px 0 rgba(16,36,58,.55),1px -1px 0 rgba(16,36,58,.55),-1px 1px 0 rgba(16,36,58,.55),1px 1px 0 rgba(16,36,58,.55),0 6px 14px rgba(0,0,0,.22)}
.season-top-versus{display:grid;place-items:center;align-self:center;padding:0 4px;font-family:var(--display-font);font-size:34px;color:#ffe96c;text-shadow:0 7px 18px rgba(255,233,108,.25)}
.season-top-actions{position:relative;z-index:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.season-top-actions .btn{display:flex;align-items:center;justify-content:center;gap:10px;min-height:60px;padding:0 18px;border-radius:16px;font-size:18px;font-weight:1000;line-height:1;box-shadow:0 7px 0 rgba(0,0,0,.18)}
.season-top-actions .btn:active{transform:translateY(3px);box-shadow:0 4px 0 rgba(0,0,0,.18)}
.season-top-match>.match-play-note{position:relative;z-index:1;margin:10px 0 0;text-align:center;color:#bcd2e2;font-size:11px}.season-top-match>.match-play-note:empty{display:none}
.season-top-existing-content{position:relative;z-index:1;margin-top:14px}

@media(max-width:1100px){.season-top-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.season-top-stat:nth-child(3n){border-right:0}.season-top-stat:nth-child(-n+3){border-bottom:1px solid rgba(255,255,255,.1)}}
@media(max-width:760px){.season-top-matchup{grid-template-columns:1fr}.season-top-versus{padding:0;font-size:26px}.season-top-team{min-height:108px}.season-top-match-head{align-items:flex-start;flex-direction:column}.season-top-actions{grid-template-columns:1fr}.season-top-actions .btn{min-height:56px;font-size:17px}}
@media(max-width:560px){.season-top-summary{grid-template-columns:repeat(6,minmax(0,1fr))}.season-top-stat{grid-column:span 2;min-height:70px;padding:10px 9px}.season-top-stat:nth-child(3),.season-top-stat:nth-child(4),.season-top-stat:nth-child(6){border-right:0}.season-top-stat:nth-child(4){grid-column:span 6;display:grid;grid-template-columns:auto 1fr;align-items:center}.season-top-stat:nth-child(5),.season-top-stat:nth-child(6){grid-column:span 3;border-bottom:0}.season-top-stat>span{font-size:8px}.season-top-stat>b{font-size:23px}.season-top-form>div{justify-self:end}.season-top-team{grid-template-columns:58px minmax(0,1fr) auto;gap:11px;padding:13px}.season-top-team-badge{width:54px;height:54px;border-radius:17px;font-size:17px}.season-top-team-badge--flag .team-color-dot{width:28px;height:28px;border-radius:8px}.season-top-team-copy strong{font-size:28px}.season-top-team-ovr{min-width:68px;gap:4px}.season-top-team-ovr span{font-size:10px;transform:translateY(-5px)}.season-top-team-ovr b{font-size:56px}.season-top-match{padding:13px!important}.season-top-matchup{padding:10px}}


/* Patch: rimozione sottotitolo/etichetta difficoltà e contrasto box evento */
.season-top-match-head{justify-content:flex-start!important;margin-bottom:12px}
.season-top-match-kicker{display:flex;align-items:center;justify-content:flex-start;min-width:0}
.season-top-existing-content>.event-card{background:linear-gradient(180deg,#fff8df,#f2ead1)!important;border:1px solid #d5b24e!important;color:#10243a!important;box-shadow:0 12px 24px rgba(8,22,38,.12)!important}
.season-top-existing-content>.event-card .label{background:rgba(16,36,58,.06)!important;color:#8b5b16!important}
.season-top-existing-content>.event-card h3{color:#163a60!important}
.season-top-existing-content>.event-card p{color:#24384d!important}
.season-top-existing-content>.event-card b,.season-top-existing-content>.event-card strong{background:rgba(255,255,255,.7)!important;border-color:#dcc27e!important;color:#10243a!important}


/* Evento risolto: riepilogo compatto espandibile */
.season-top-existing-content>.season-event-result-card{overflow:hidden;border:1px solid #d5b24e;border-radius:18px;background:linear-gradient(180deg,#fff9e5,#f2ead1);color:#10243a;box-shadow:0 12px 24px rgba(8,22,38,.12)}
.season-event-result-card>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:15px 17px;cursor:pointer;list-style:none;background:linear-gradient(90deg,rgba(255,255,255,.76),rgba(255,246,210,.62));transition:background .2s ease,box-shadow .2s ease}
.season-event-result-card>summary::-webkit-details-marker{display:none}
.season-event-result-card>summary:hover{background:linear-gradient(90deg,#fffdf5,#fff1bd);box-shadow:inset 4px 0 0 #d4b13f}
.season-event-result-main{display:block;min-width:0}
.season-event-result-kicker{display:block;margin-bottom:5px;color:#8b5b16;font-size:10px;font-weight:1000;letter-spacing:.14em;text-transform:uppercase}
.season-event-result-main>strong{display:block;background:none!important;border:0!important;padding:0!important;color:#163a60!important;font-size:clamp(17px,1.55vw,22px);font-weight:1000;line-height:1.25;overflow-wrap:anywhere}
.season-event-result-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:9px 12px;border-radius:999px;background:#10243a;color:#fff;font-size:10px;font-weight:1000;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap;box-shadow:0 6px 14px rgba(16,36,58,.18)}
.season-event-result-toggle-open{display:none}
.season-event-result-card[open] .season-event-result-toggle-closed{display:none}
.season-event-result-card[open] .season-event-result-toggle-open{display:inline}
.season-event-result-card[open]>summary{border-bottom:1px solid rgba(139,91,22,.22);background:linear-gradient(90deg,#fff8de,#f8e9b3)}
.season-event-result-details{padding:15px 17px 17px;background:rgba(255,255,255,.46)}
.season-event-result-details .label{display:inline-flex;margin-bottom:8px;padding:5px 9px;border-radius:999px;background:rgba(16,36,58,.07)!important;color:#8b5b16!important;font-size:9px;font-weight:1000;letter-spacing:.12em;text-transform:uppercase}
.season-event-result-details h3{margin:0;color:#163a60!important;font-size:clamp(18px,1.8vw,25px);line-height:1.1}
.season-event-result-details p{margin:9px 0 0;color:#24384d!important;font-size:14px;font-weight:800;line-height:1.5}
.season-event-result-details .quest-notice{margin-top:12px}
@media(max-width:640px){.season-event-result-card>summary{grid-template-columns:1fr;gap:10px;padding:13px 14px}.season-event-result-toggle{justify-self:start;min-width:auto}.season-event-result-main>strong{font-size:17px}.season-event-result-details{padding:13px 14px 15px}}

/* === Mobile readability audit 2026-07-29 === */
@media (max-width:760px){
  html,body{max-width:100%;overflow-x:hidden}
  body.page-season{font-size:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body.page-season .app{width:100%!important;max-width:100%!important;padding:8px 8px 24px!important}

  /* Barra superiore: contenuti leggibili e pulsanti realmente toccabili. */
  body.page-season .topbar{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;padding:10px!important}
  body.page-season .brand{width:100%;min-width:0}
  body.page-season .brand img{width:42px!important;height:42px!important;flex:0 0 auto}
  body.page-season .brand div{min-width:0}
  body.page-season .brand div b{font-size:14px!important;line-height:1.08!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.page-season .brand div span{font-size:10px!important;line-height:1.25!important;white-space:normal!important}
  body.page-season .top-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;width:100%}
  body.page-season .save-status{grid-column:1/-1;justify-content:center;min-height:36px;padding:8px!important;font-size:10px!important;white-space:normal;text-align:center}
  body.page-season .top-actions .btn{width:100%;min-height:44px!important;padding:9px 7px!important;font-size:11px!important;line-height:1.15!important;white-space:normal!important}

  /* Testata e pannelli. */
  body.page-season .hero.hero-season{margin:8px 0!important}
  body.page-season .hero-season-inner{padding:13px!important}
  body.page-season .hero-kicker{font-size:9px!important}
  body.page-season .hero-season-copy h1{font-size:clamp(22px,8vw,34px)!important;line-height:.95!important}
  body.page-season .hero-season-copy p{font-size:12px!important;line-height:1.48!important}
  .season-dashboard-grid .panel,.season-home-card,.season-top-match{border-radius:16px!important}
  .season-dashboard-grid .panel{padding:12px!important}
  .season-dashboard-grid .label{font-size:10px!important;line-height:1.25!important}
  .season-dashboard-grid h2,.season-dashboard-grid h3{line-height:1.08!important}
  .season-dashboard-grid p{font-size:12px!important;line-height:1.5!important}

  /* Riepilogo: etichette non microscopiche. */
  .season-top-summary{border-radius:14px!important}
  .season-top-stat{min-height:72px!important;padding:10px 8px!important}
  .season-top-stat>span{font-size:9px!important;line-height:1.2!important;letter-spacing:.04em!important}
  .season-top-stat>b{font-size:22px!important;line-height:1!important}
  .season-top-stat b small{font-size:10px!important}
  .season-top-form-result{min-width:22px!important;height:22px!important;font-size:10px!important}

  /* Partita: nome sempre su una riga e adattato dinamicamente. */
  .season-top-match{padding:11px!important}
  .season-top-match-head{gap:5px!important;margin-bottom:10px!important}
  .season-top-match-head span{font-size:10px!important;line-height:1.25!important}
  .season-top-match-head b{font-size:16px!important;line-height:1.15!important}
  .season-top-matchup{grid-template-columns:1fr!important;gap:8px!important;padding:8px!important;border-radius:16px!important;overflow:visible!important}
  .season-top-versus{font-size:22px!important;line-height:1!important;padding:2px 0!important}
  .season-top-team{grid-template-columns:48px minmax(0,1fr) 66px!important;gap:9px!important;min-height:92px!important;padding:11px!important;border-radius:15px!important;overflow:hidden!important}
  .season-top-team-badge{width:46px!important;height:46px!important;border-radius:14px!important;font-size:15px!important}
  .season-top-team-badge--flag .team-color-dot{width:26px!important;height:26px!important;border-width:2px!important;border-radius:7px!important}
  .season-top-team-copy{min-width:0!important;width:100%!important;overflow:hidden!important}
  .season-top-team-copy strong{
    display:block!important;width:100%!important;max-width:100%!important;
    font-size:var(--mobile-team-font,16px)!important;line-height:1.02!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
    overflow-wrap:normal!important;word-break:keep-all!important;text-wrap:nowrap!important;
    letter-spacing:-.015em!important
  }
  .season-top-team-ovr{min-width:62px!important;gap:3px!important;align-items:center!important;justify-content:flex-end!important}
  .season-top-team-ovr span{font-size:9px!important;transform:none!important}
  .season-top-team-ovr b{font-size:45px!important;line-height:.84!important}

  /* Compatibilità con la vecchia card prossima partita. */
  .season-match-panel .next-match,.season-home-next-match{grid-template-columns:1fr!important;gap:8px!important;padding:8px!important}
  .season-match-panel .next-team-card,.season-home-next-match .next-team-card{min-height:84px!important;padding:11px!important}
  .season-match-panel .team-name,.season-home-next-match .team-name{
    display:block!important;width:100%!important;max-width:100%!important;
    font-size:var(--mobile-team-font,15px)!important;line-height:1.05!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
    overflow-wrap:normal!important;word-break:keep-all!important
  }
  .season-match-panel .versus,.season-home-next-match .versus{font-size:20px!important;padding:2px 0!important}
  .season-match-panel .next-team-ovr,.season-home-next-match .next-team-ovr{font-size:10px!important;min-width:58px!important}

  /* Azioni partita: testo e area cliccabile più grandi. */
  .season-top-actions,.match-play-actions,.season-home-match-actions{grid-template-columns:1fr!important;gap:9px!important}
  .season-top-actions .btn,.match-play-actions .btn,.season-home-match-actions .btn{min-height:52px!important;padding:12px!important;font-size:15px!important;line-height:1.2!important}
  .match-play-note,.season-home-match .match-play-note{font-size:11px!important;line-height:1.4!important;padding:8px 10px!important}

  /* Oggetti, eventi e scelte. */
  .season-event-dialog{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;padding:58px 12px 15px!important;border-radius:18px!important}
  .season-event-title{font-size:clamp(23px,8vw,32px)!important;line-height:1.02!important}
  .season-event-copy{font-size:14px!important;line-height:1.55!important}
  .season-event-choice-grid{grid-template-columns:1fr!important;gap:12px!important}
  .season-event-choice{min-height:160px!important;padding:16px!important;border-radius:17px!important}
  .season-event-choice b{font-size:23px!important;line-height:1.05!important}
  .season-event-choice small{font-size:13px!important;line-height:1.5!important}
  .season-event-option-label,.season-event-choice-risk{font-size:9px!important;padding:6px 8px!important}
  .season-event-hint{font-size:10px!important;line-height:1.4!important}

  /* Navigazione e tabelle. */
  .season-tabs-panel{padding:10px!important;overflow:hidden!important}
  .season-tabs-panel .tabs{display:flex!important;gap:7px!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding:2px 1px 8px!important;scrollbar-width:none}
  .season-tabs-panel .tabs::-webkit-scrollbar{display:none}
  .season-tabs-panel .tab{flex:0 0 auto!important;min-width:104px!important;min-height:42px!important;padding:9px 11px!important;font-size:11px!important}
  .season-table-scroll{overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .season-table-scroll table{min-width:610px!important}
  .season-table-scroll th{font-size:9px!important}
  .season-table-scroll td{font-size:11px!important;line-height:1.3!important}
  .calendar-row{min-width:0!important}
  .calendar-clubs{font-size:11px!important;line-height:1.3!important}

  /* Rosa e disponibilità: eliminati testi da 6–8 px. */
  .season-board-pill{font-size:10px!important;line-height:1.2!important}
  .season-roster-field-slot .season-slot-name{font-size:9.5px!important;line-height:1.08!important}
  .season-roster-field-slot .season-slot-role{font-size:8.5px!important}
  .season-roster-field-slot .season-slot-chem{font-size:8px!important}
  .season-roster-bench-title{font-size:10px!important}
  .season-roster-bench-card b,.availability-row b,.opponent-roster-row b{font-size:12px!important}
  .season-roster-bench-card small,.availability-row small,.opponent-roster-row small{font-size:10px!important;line-height:1.35!important}
  .resolved-name-line b{font-size:12px!important}
  .resolved-meta,.resolved-effect{font-size:9px!important;line-height:1.3!important}
  .resolved-tag-sub,.resolved-tag-creator,.resolved-tag-item{font-size:8px!important}

  /* Form e accessibilità touch. */
  button,.btn,a.btn,summary,[role="button"]{touch-action:manipulation}
  input,select,textarea{font-size:16px!important;min-height:44px}
}

@media (max-width:390px){
  .season-top-team{grid-template-columns:42px minmax(0,1fr) 58px!important;gap:7px!important;padding:9px!important}
  .season-top-team-badge{width:40px!important;height:40px!important;border-radius:12px!important}
  .season-top-team-ovr{min-width:54px!important}
  .season-top-team-ovr b{font-size:39px!important}
  .season-top-team-ovr span{font-size:8px!important}
  .season-top-team-copy strong{font-size:var(--mobile-team-font,14px)!important}
  .season-top-actions .btn,.match-play-actions .btn{font-size:14px!important}
}
