/* Legalofe v182 - selettori mobile: nativo affidabile su Android, personalizzato su iOS. Desktop invariato. */
@media (max-width:800px), (pointer:coarse) {
  .lofe-native-select-hidden {
    position:absolute!important;
    inline-size:1px!important;
    block-size:1px!important;
    opacity:0!important;
    pointer-events:none!important;
    overflow:hidden!important;
    clip-path:inset(50%)!important;
  }

  .lofe-select-trigger {
    width:100%;
    min-height:46px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 22px;
    align-items:center;
    gap:8px;
    padding:8px 11px;
    border:1px solid #185884;
    border-radius:10px;
    background:#fff;
    color:#111827;
    font:inherit;
    text-align:left;
    box-shadow:none;
    -webkit-tap-highlight-color:transparent;
  }
  .lofe-select-trigger:focus-visible { outline:2px solid #2798e8; outline-offset:2px; }
  .lofe-select-trigger[disabled] { opacity:.55; }
  .lofe-select-trigger__text { min-width:0; display:flex; flex-direction:column; gap:1px; }
  .lofe-select-trigger__primary { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#111827; font-size:.94rem; font-weight:600; line-height:1.15; }
  .lofe-select-trigger__secondary { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#667085; font-size:.72rem; line-height:1.1; }
  .lofe-select-trigger__chevron { width:9px; height:9px; justify-self:center; border-right:2px solid #597286; border-bottom:2px solid #597286; transform:rotate(45deg) translateY(-2px); }

  .lofe-select-backdrop {
    position:fixed; inset:0; z-index:2147483000;
    display:flex; align-items:flex-end; justify-content:center;
    background:rgba(5,25,40,.42);
    padding:12px;
    overscroll-behavior:contain;
  }
  .lofe-select-backdrop[hidden] { display:none!important; }
  .lofe-select-sheet {
    width:min(100%,560px);
    max-height:min(78vh,720px);
    display:flex; flex-direction:column;
    overflow:hidden;
    border:1px solid #5d8aa6;
    border-radius:18px;
    background:#f8fbfd;
    box-shadow:0 18px 60px rgba(0,0,0,.28);
  }
  .lofe-select-sheet__head {
    display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px;
    padding:13px 14px 11px;
    border-bottom:1px solid #c8e2ef;
    background:#082c47;
    color:#fff;
  }
  .lofe-select-sheet__title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:1rem; font-weight:700; }
  .lofe-select-sheet__close {
    width:34px; height:34px; border:1px solid rgba(255,255,255,.28); border-radius:9px;
    background:transparent; color:#fff; font-size:1.3rem; line-height:1; padding:0;
  }
  .lofe-select-options { overflow:auto; -webkit-overflow-scrolling:touch; padding:0; background:#fff; }
  .lofe-select-option {
    width:100%; min-height:52px; box-sizing:border-box;
    display:grid; grid-template-columns:minmax(0,1fr) 24px; align-items:center; gap:10px;
    padding:8px 13px;
    border:0; border-bottom:1px solid #d7ebf4;
    border-radius:0;
    background:#fff;
    color:#111827;
    font:inherit; text-align:left;
  }
  .lofe-select-option:last-child { border-bottom:0; }
  .lofe-select-option:active { background:#eef7fb; }
  .lofe-select-option.is-selected { background:#eaf6fc; }
  .lofe-select-option__text { min-width:0; display:flex; flex-direction:column; gap:2px; }
  .lofe-select-option__primary { color:#111827; font-size:.95rem; font-weight:650; line-height:1.15; overflow-wrap:anywhere; }
  .lofe-select-option__secondary { color:#667085; font-size:.74rem; line-height:1.1; }
  .lofe-select-option__check { justify-self:center; color:#167bbb; font-size:1rem; font-weight:800; opacity:0; }
  .lofe-select-option.is-selected .lofe-select-option__check { opacity:1; }
  .lofe-select-empty { padding:20px 14px; text-align:center; color:#667085; background:#fff; }

  .lofe-select-trigger,
  .lofe-select-trigger * ,
  .lofe-select-option,
  .lofe-select-option * { color:#111827!important; }
  .lofe-select-trigger__secondary,
  .lofe-select-option__secondary { color:#667085!important; }
  .lofe-select-option__check { color:#167bbb!important; }
  .lofe-select-sheet__head,
  .lofe-select-sheet__head * { color:#fff!important; }
  body.lofe-select-open { overflow:hidden!important; touch-action:none; }
}

/* v179: colore testo blindato contro i vecchi override di pagina */
@media (max-width:800px), (pointer:coarse) {
  html body #lofe-main .lofe-select-trigger,
  html body #lofe-main .lofe-select-trigger .lofe-select-trigger__text,
  html body #lofe-main .lofe-select-trigger .lofe-select-trigger__primary,
  html body #lofe-main .lofe-select-trigger .lofe-select-trigger__primary *,
  html body .lofe-select-backdrop .lofe-select-option,
  html body .lofe-select-backdrop .lofe-select-option .lofe-select-option__text,
  html body .lofe-select-backdrop .lofe-select-option .lofe-select-option__primary,
  html body .lofe-select-backdrop .lofe-select-option .lofe-select-option__primary * {
    color:#111827!important;
    -webkit-text-fill-color:#111827!important;
    text-shadow:none!important;
  }

  html body #lofe-main .lofe-select-trigger .lofe-select-trigger__secondary,
  html body .lofe-select-backdrop .lofe-select-option .lofe-select-option__secondary {
    color:#596273!important;
    -webkit-text-fill-color:#596273!important;
    text-shadow:none!important;
  }

  html body .lofe-select-backdrop .lofe-select-option__check {
    color:#167bbb!important;
    -webkit-text-fill-color:#167bbb!important;
  }

  /* L'intestazione del pannello resta volutamente bianca sul blu */
  html body .lofe-select-backdrop .lofe-select-sheet__head,
  html body .lofe-select-backdrop .lofe-select-sheet__head * {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
  }
}

/* v180 - fix geometria selettori Live/Risultati/Formazioni su mobile */
@media (max-width:800px), (pointer:coarse) {
  html body #lofe-main :is(.mobile-match-choice,.result-mobile-match-choice,.formations-round-search),
  html body #lofe-main :is(.mobile-match-choice,.result-mobile-match-choice,.formations-round-search) * {
    box-sizing:border-box!important;
    min-width:0!important;
  }
  html body #lofe-main :is(.mobile-match-choice,.result-mobile-match-choice,.formations-round-search) {
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }
  html body #lofe-main :is(.mobile-match-choice,.result-mobile-match-choice,.formations-round-search) > .lofe-select-trigger {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    position:relative!important;
    z-index:3!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    overflow:hidden!important;
  }
  html body #lofe-main :is(.mobile-match-choice,.result-mobile-match-choice) .lofe-select-trigger__text,
  html body #lofe-main :is(.mobile-match-choice,.result-mobile-match-choice) .lofe-select-trigger__primary,
  html body #lofe-main :is(.mobile-match-choice,.result-mobile-match-choice) .lofe-select-trigger__secondary {
    min-width:0!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  html body.page-live #lofe-main .mobile-match-choice .lofe-select-trigger,
  html body.page-risultati #lofe-main .result-mobile-match-choice .lofe-select-trigger {
    font-size:.88rem!important;
  }
  html body.page-risultati .lofe-select-backdrop .lofe-select-option__primary,
  html body.page-risultati .lofe-select-backdrop .lofe-select-option__secondary,
  html body.page-live .lofe-select-backdrop .lofe-select-option__primary,
  html body.page-live .lofe-select-backdrop .lofe-select-option__secondary {
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  html body.page-formazioni #lofe-main .formations-mobile-filterbar .formations-round-search > .lofe-select-trigger {
    height:40px!important;
    min-height:40px!important;
    padding:0 8px!important;
    border-radius:8px!important;
    font-size:12px!important;
    text-align:center!important;
  }
  html body.page-formazioni #lofe-main .formations-mobile-filterbar .formations-round-search > .lofe-select-trigger .lofe-select-trigger__text {
    align-items:center!important;
  }
  html body.page-formazioni #lofe-main .formations-mobile-filterbar .formations-round-search > .lofe-select-trigger .lofe-select-trigger__primary {
    width:100%!important;
    text-align:center!important;
  }
}

/* ========================================================================== */
/* v181 - fix reale selettori mobile: Live / Risultati / Formazioni          */
/* ========================================================================== */
@media (max-width:800px), (pointer:coarse) {
  /* Gli host reali del sito devono essere sempre contenuti nella card. */
  html body #lofe-main label.mobile-match-choice,
  html body #lofe-main label.result-mobile-match-choice {
    box-sizing:border-box!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
  }

  html body #lofe-main label.mobile-match-choice > .lofe-select-trigger,
  html body #lofe-main label.result-mobile-match-choice > .lofe-select-trigger {
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 16px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    overflow:hidden!important;
  }

  /* Partita tutta su una riga: niente casa/trasferta a capo. */
  html body #lofe-main label.mobile-match-choice .lofe-select-trigger__text,
  html body #lofe-main label.result-mobile-match-choice .lofe-select-trigger__text,
  html body #lofe-main label.mobile-match-choice .lofe-select-trigger__primary,
  html body #lofe-main label.result-mobile-match-choice .lofe-select-trigger__primary {
    display:block!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  html body #lofe-main label.mobile-match-choice .lofe-select-trigger__secondary,
  html body #lofe-main label.result-mobile-match-choice .lofe-select-trigger__secondary {
    display:none!important;
  }

  /* Anche nel pannello aperto i nomi partita restano su una sola riga. */
  html body:is(.page-live,.page-risultati,.page-formazioni) .lofe-select-backdrop .lofe-select-option__primary {
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  /* Formazioni inviate: neutralizza appearance/display del vecchio select. */
  html body.page-formazioni #lofe-main .formations-round-search.lofe-select-host {
    display:block!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }
  html body.page-formazioni #lofe-main .formations-round-search.lofe-select-host > select.lofe-native-select-hidden,
  html body.page-formazioni #lofe-main label.mobile-match-choice.lofe-select-host > select.lofe-native-select-hidden {
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    min-width:1px!important;
    min-height:1px!important;
    margin:-1px!important;
    padding:0!important;
    border:0!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    overflow:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    appearance:none!important;
    -webkit-appearance:none!important;
  }
  html body.page-formazioni #lofe-main .formations-round-search.lofe-select-host > .lofe-select-trigger {
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 14px!important;
    width:100%!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0 8px!important;
    border:1px solid #b9cad6!important;
    border-radius:8px!important;
    background:#fff!important;
    color:#111827!important;
    -webkit-text-fill-color:#111827!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    overflow:hidden!important;
    position:relative!important;
    z-index:10!important;
  }
  html body.page-formazioni #lofe-main .formations-round-search.lofe-select-host > .lofe-select-trigger .lofe-select-trigger__primary {
    color:#111827!important;
    -webkit-text-fill-color:#111827!important;
    text-align:center!important;
    white-space:nowrap!important;
  }

  /* Il selettore partita di Formazioni deve essere tappabile sopra i vecchi layer. */
  html body.page-formazioni #lofe-main label.mobile-match-choice.lofe-select-host,
  html body.page-formazioni #lofe-main label.mobile-match-choice.lofe-select-host > .lofe-select-trigger {
    position:relative!important;
    z-index:12!important;
    pointer-events:auto!important;
  }
}



/* ========================================================================== */
/* v184 - selettore custom unico Android/iOS, click-only                      */
/* ========================================================================== */
@media (max-width:800px), (pointer:coarse) {
  html body #lofe-main .lofe-select-host {
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html body #lofe-main .lofe-select-host > .lofe-select-trigger {
    display:grid!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    color:#111827!important;
    -webkit-text-fill-color:#111827!important;
    background:#fff!important;
    border:1px solid #185884!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }
  html body #lofe-main .lofe-select-host > select.lofe-native-select-hidden {
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    min-width:1px!important;
    min-height:1px!important;
    margin:-1px!important;
    padding:0!important;
    border:0!important;
    opacity:0!important;
    pointer-events:none!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    overflow:hidden!important;
  }
  html body .lofe-select-backdrop .lofe-select-option,
  html body .lofe-select-backdrop .lofe-select-option *,
  html body #lofe-main .lofe-select-trigger,
  html body #lofe-main .lofe-select-trigger * {
    color:#111827!important;
    -webkit-text-fill-color:#111827!important;
  }
  html body .lofe-select-backdrop .lofe-select-sheet__head,
  html body .lofe-select-backdrop .lofe-select-sheet__head * {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
  }
}

/* ========================================================================== */
/* v185 - Android: pannello e trigger sempre dentro il viewport               */
/* ========================================================================== */
@media (max-width:800px), (pointer:coarse) {
  html, body { max-width:100%; }

  html body .lofe-select-backdrop {
    box-sizing:border-box!important;
    width:100vw!important;
    max-width:100vw!important;
    height:100vh!important;
    min-height:100dvh!important;
    inset:0!important;
    margin:0!important;
    padding:10px!important;
    overflow:hidden!important;
  }

  html body .lofe-select-backdrop .lofe-select-sheet {
    box-sizing:border-box!important;
    width:calc(100vw - 20px)!important;
    max-width:min(560px, calc(100vw - 20px))!important;
    min-width:0!important;
    margin:0 auto!important;
    overflow:hidden!important;
  }

  @supports (width:100dvw) {
    html body .lofe-select-backdrop {
      width:100dvw!important;
      max-width:100dvw!important;
    }
    html body .lofe-select-backdrop .lofe-select-sheet {
      width:calc(100dvw - 20px)!important;
      max-width:min(560px, calc(100dvw - 20px))!important;
    }
  }

  html body .lofe-select-backdrop .lofe-select-sheet *,
  html body .lofe-select-backdrop .lofe-select-options,
  html body .lofe-select-backdrop .lofe-select-option,
  html body .lofe-select-backdrop .lofe-select-option__text {
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body:is(.page-live,.page-risultati) #lofe-main label.lofe-select-host,
  html body:is(.page-live,.page-risultati) #lofe-main .lofe-select-host,
  html body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger {
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  html body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger {
    grid-template-columns:minmax(0,1fr) 16px!important;
    overflow:hidden!important;
  }

  html body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger__text,
  html body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger__primary {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}

/* ========================================================================== */
/* v186 - Android Live/Risultati: popup gara centrato e contenuto nel viewport */
/* ========================================================================== */
@media (max-width:800px), (pointer:coarse) {
  html.lofe-platform-android body:is(.page-live,.page-risultati) .lofe-select-backdrop {
    align-items:center!important;
    justify-content:center!important;
    padding:max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom))!important;
    overflow:hidden!important;
  }

  html.lofe-platform-android body:is(.page-live,.page-risultati) .lofe-select-backdrop .lofe-select-sheet {
    width:calc(100vw - 28px)!important;
    max-width:520px!important;
    max-height:72vh!important;
    margin:0 auto!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }

  @supports (width:100dvw) {
    html.lofe-platform-android body:is(.page-live,.page-risultati) .lofe-select-backdrop .lofe-select-sheet {
      width:calc(100dvw - 28px)!important;
      max-height:72dvh!important;
    }
  }

  html.lofe-platform-android body:is(.page-live,.page-risultati) .lofe-select-backdrop .lofe-select-sheet__head {
    flex:0 0 auto!important;
  }

  html.lofe-platform-android body:is(.page-live,.page-risultati) .lofe-select-backdrop .lofe-select-options {
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding-bottom:max(6px, env(safe-area-inset-bottom))!important;
  }
}


/* ========================================================================== */
/* v187 - Android Live/Risultati: dialog top-layer centrato sul viewport reale */
/* ========================================================================== */
@media (max-width:800px), (pointer:coarse) {
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog {
    position:fixed!important;
    inset:0!important;
    box-sizing:border-box!important;
    width:100vw!important;
    max-width:none!important;
    height:100vh!important;
    max-height:none!important;
    margin:0!important;
    padding:16px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    overflow:hidden!important;
    align-items:center!important;
    justify-content:center!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog[open] {
    display:flex!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog::backdrop {
    background:rgba(5,25,40,.46)!important;
  }
  @supports (width:100dvw) {
    html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog {
      width:100dvw!important;
      height:100dvh!important;
      padding:max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom))!important;
    }
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog > .lofe-select-sheet {
    box-sizing:border-box!important;
    width:min(92vw, 500px)!important;
    max-width:min(92vw, 500px)!important;
    max-height:min(68vh, 620px)!important;
    margin:0!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }
  @supports (width:100dvw) {
    html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog > .lofe-select-sheet {
      width:min(92dvw, 500px)!important;
      max-width:min(92dvw, 500px)!important;
      max-height:min(68dvh, 620px)!important;
    }
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog .lofe-select-option {
    min-height:48px!important;
    padding:7px 11px!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog .lofe-select-option__primary {
    font-size:.86rem!important;
    line-height:1.18!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
  }
}


/* ========================================================================== */
/* v188 - Android Live/Risultati: bottom sheet interattivo e richiudibile      */
/* ========================================================================== */
@media (max-width:800px), (pointer:coarse) {
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog {
    display:none!important;
    align-items:flex-end!important;
    justify-content:center!important;
    padding:10px 10px max(14px, env(safe-area-inset-bottom))!important;
    pointer-events:auto!important;
    touch-action:auto!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog[open] {
    display:flex!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati).lofe-select-open {
    overflow:hidden!important;
    touch-action:auto!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog > .lofe-select-sheet {
    width:calc(100vw - 20px)!important;
    max-width:520px!important;
    max-height:min(72vh, 650px)!important;
    margin:0 auto!important;
    border-radius:18px 18px 14px 14px!important;
    pointer-events:auto!important;
    touch-action:auto!important;
  }
  @supports (width:100dvw) {
    html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog > .lofe-select-sheet {
      width:calc(100dvw - 20px)!important;
      max-height:min(72dvh, 650px)!important;
    }
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog .lofe-select-sheet__close,
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog .lofe-select-option {
    pointer-events:auto!important;
    touch-action:manipulation!important;
    -webkit-user-select:none!important;
    user-select:none!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog .lofe-select-options {
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    touch-action:pan-y!important;
    -webkit-overflow-scrolling:touch!important;
  }
}


/* ========================================================================== */
/* v189 - Android Live/Risultati: feedback istantaneo e anti doppio tap       */
/* ========================================================================== */
@media (max-width:800px), (pointer:coarse) {
  html.lofe-platform-android body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger {
    transition:background-color .08s ease, border-color .08s ease, transform .08s ease!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger:active,
  html.lofe-platform-android body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger.is-opening {
    background:#eef7fb!important;
    border-color:#7fbad8!important;
    transform:scale(.995)!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger.is-opening .lofe-select-trigger__chevron {
    width:16px!important;
    height:16px!important;
    border:2px solid #9ecce3!important;
    border-top-color:#167bbb!important;
    border-radius:50%!important;
    transform:none!important;
    animation:lofe-select-spin .42s linear infinite!important;
  }
  @keyframes lofe-select-spin { to { transform:rotate(360deg); } }

  /* Entrata piu rapida del bottom sheet: il pannello sembra rispondere subito. */
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog[open] > .lofe-select-sheet {
    animation:lofe-sheet-in .14s cubic-bezier(.2,.8,.2,1) both!important;
  }
  @keyframes lofe-sheet-in {
    from { transform:translateY(16px); opacity:.72; }
    to { transform:translateY(0); opacity:1; }
  }
}


/* ========================================================================== */
/* v190 - Android Live/Risultati: apertura immediata, niente spinner/attese    */
/* ========================================================================== */
@media (max-width:800px), (pointer:coarse) {
  html.lofe-platform-android body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger {
    transition:background-color .05s ease,border-color .05s ease!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger.is-opening {
    transform:none!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) #lofe-main .lofe-select-trigger.is-opening .lofe-select-trigger__chevron {
    width:10px!important;
    height:10px!important;
    border:0!important;
    border-right:2px solid #55788f!important;
    border-bottom:2px solid #55788f!important;
    border-radius:0!important;
    animation:none!important;
    transform:rotate(45deg) translateY(-2px)!important;
  }
  html.lofe-platform-android body:is(.page-live,.page-risultati) dialog.lofe-select-dialog[open] > .lofe-select-sheet {
    animation:lofe-sheet-in-fast .08s ease-out both!important;
  }
  @keyframes lofe-sheet-in-fast {
    from { transform:translateY(8px); opacity:.9; }
    to { transform:translateY(0); opacity:1; }
  }
}


/* v194 - Invio formazione: ruoli evidenti nel selettore panchina */
@media (max-width:800px), (pointer:coarse) {
  html body.page-formazione .lofe-select-backdrop .lofe-select-role-heading,
  html body.page-formazione dialog.lofe-select-dialog .lofe-select-role-heading {
    position:sticky;
    top:0;
    z-index:2;
    padding:7px 12px;
    border-top:1px solid #d7ebf4;
    border-bottom:1px solid #d7ebf4;
    background:#eef7fb;
    color:#31495a!important;
    -webkit-text-fill-color:#31495a!important;
    font-size:11px;
    font-weight:850;
    letter-spacing:.06em;
    text-transform:uppercase;
  }
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role,
  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role {
    grid-template-columns:30px minmax(0,1fr) 24px!important;
    gap:9px!important;
    min-height:56px!important;
  }
  html body.page-formazione .lofe-select-option__role {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:26px!important;
    height:26px!important;
    border-radius:8px!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    font-size:11px!important;
    font-weight:900!important;
    line-height:1!important;
  }
  html body.page-formazione .lofe-select-option__role.role-p { background:#d39b1e!important; }
  html body.page-formazione .lofe-select-option__role.role-d { background:#2c9a64!important; }
  html body.page-formazione .lofe-select-option__role.role-c { background:#2687c8!important; }
  html body.page-formazione .lofe-select-option__role.role-a { background:#cf4b50!important; }
  html body.page-formazione .lofe-select-option.has-role .lofe-select-option__primary {
    font-weight:750!important;
    color:#111827!important;
    -webkit-text-fill-color:#111827!important;
  }
}


/* v195 - Panchina: ruoli sempre visibili e selezione stabile */
@media (max-width:800px), (pointer:coarse) {
  html body.page-formazione .lofe-select-option.has-role {
    display:grid!important;
    grid-template-columns:32px minmax(0,1fr) 24px!important;
    align-items:center!important;
    background:#fff!important;
  }
  html body.page-formazione .lofe-select-option__role {
    display:flex!important;
    width:28px!important;
    height:28px!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:8px!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    font-size:12px!important;
    font-weight:900!important;
  }
  html body.page-formazione .lofe-select-option__role.role-p{background:#d39b1e!important}
  html body.page-formazione .lofe-select-option__role.role-d{background:#2c9a64!important}
  html body.page-formazione .lofe-select-option__role.role-c{background:#2687c8!important}
  html body.page-formazione .lofe-select-option__role.role-a{background:#cf4b50!important}
  html body.page-formazione .lofe-select-role-heading{
    display:block!important;
    background:#eaf6fc!important;
    color:#243746!important;
    -webkit-text-fill-color:#243746!important;
  }
}

/* v196 - no ghost click dopo selezione formazione */

/* v197 - Invio formazione mobile: righe selettore panchina compatte e leggibili */
@media (max-width:800px), (pointer:coarse) {
  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role,
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role {
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-width:0!important;
    min-height:58px!important;
    height:auto!important;
    padding:8px 12px!important;
    gap:10px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role .lofe-select-option__role,
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role .lofe-select-option__role {
    flex:0 0 28px!important;
    width:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    height:28px!important;
    margin:0!important;
    padding:0!important;
    align-self:center!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role .lofe-select-option__text,
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role .lofe-select-option__text {
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    min-width:0!important;
    width:auto!important;
    max-width:none!important;
    gap:2px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role .lofe-select-option__primary,
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role .lofe-select-option__primary {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    color:#111827!important;
    -webkit-text-fill-color:#111827!important;
    font-size:15px!important;
    font-weight:750!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role .lofe-select-option__secondary,
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role .lofe-select-option__secondary {
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    color:#667085!important;
    -webkit-text-fill-color:#667085!important;
    font-size:12px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role .lofe-select-option__check,
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role .lofe-select-option__check {
    display:block!important;
    flex:0 0 24px!important;
    width:24px!important;
    min-width:24px!important;
    margin-left:auto!important;
    text-align:center!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-role-heading,
  html body.page-formazione .lofe-select-backdrop .lofe-select-role-heading {
    width:100%!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:7px 12px!important;
    line-height:1.2!important;
  }
}


/* v198 - Invio formazione: popup panchina pulito e stabile */
@media (max-width:800px), (pointer:coarse) {
  html body.page-formazione dialog.lofe-select-dialog .lofe-select-options,
  html body.page-formazione .lofe-select-backdrop .lofe-select-options {
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
  }

  html body.page-formazione dialog.lofe-select-dialog button.lofe-select-option.has-role,
  html body.page-formazione .lofe-select-backdrop button.lofe-select-option.has-role {
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:58px!important;
    height:58px!important;
    margin:0!important;
    padding:7px 12px!important;
    gap:10px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    background:#fff!important;
  }

  html body.page-formazione dialog.lofe-select-dialog button.lofe-select-option.has-role > .lofe-select-option__role,
  html body.page-formazione .lofe-select-backdrop button.lofe-select-option.has-role > .lofe-select-option__role {
    display:inline-flex!important;
    flex:0 0 28px!important;
    width:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    height:28px!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0!important;
    padding:0!important;
    border-radius:8px!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    font-size:12px!important;
    font-weight:900!important;
    line-height:1!important;
  }
  html body.page-formazione .lofe-select-option__role.role-p{background:#d39b1e!important}
  html body.page-formazione .lofe-select-option__role.role-d{background:#2c9a64!important}
  html body.page-formazione .lofe-select-option__role.role-c{background:#2687c8!important}
  html body.page-formazione .lofe-select-option__role.role-a{background:#cf4b50!important}

  html body.page-formazione dialog.lofe-select-dialog button.lofe-select-option.has-role > .lofe-select-option__text,
  html body.page-formazione .lofe-select-backdrop button.lofe-select-option.has-role > .lofe-select-option__text {
    display:flex!important;
    flex:1 1 0!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    min-width:0!important;
    width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    gap:2px!important;
    overflow:hidden!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role .lofe-select-option__primary,
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role .lofe-select-option__primary {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    color:#111827!important;
    -webkit-text-fill-color:#111827!important;
    font-size:15px!important;
    font-weight:700!important;
    line-height:1.15!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-option.has-role .lofe-select-option__secondary,
  html body.page-formazione .lofe-select-backdrop .lofe-select-option.has-role .lofe-select-option__secondary {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    color:#667085!important;
    -webkit-text-fill-color:#667085!important;
    font-size:12px!important;
    line-height:1.1!important;
  }

  html body.page-formazione dialog.lofe-select-dialog button.lofe-select-option.has-role > .lofe-select-option__check,
  html body.page-formazione .lofe-select-backdrop button.lofe-select-option.has-role > .lofe-select-option__check {
    display:flex!important;
    flex:0 0 24px!important;
    width:24px!important;
    min-width:24px!important;
    height:24px!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0!important;
  }

  html body.page-formazione dialog.lofe-select-dialog .lofe-select-role-heading,
  html body.page-formazione .lofe-select-backdrop .lofe-select-role-heading {
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:7px 12px!important;
    box-sizing:border-box!important;
    background:#eaf6fc!important;
    color:#243746!important;
    -webkit-text-fill-color:#243746!important;
    font-size:12px!important;
    font-weight:800!important;
    line-height:1.2!important;
  }
}
