/*
 * Legalofe - Rose
 * Restyling desktop coerente con Home v500/v606.
 * Struttura PHP invariata. Mobile conservato.
 */

.rose-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

.rose-roster-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(24, 140, 210, .48);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .2);
}

.rose-roster-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: .55rem .75rem;
  border-bottom: 1px solid #185884;
  background: #0b304b;
  color: #fff;
}

.rose-roster-heading h2 { margin: 0; color: #fff; font-size: .98rem; }
.rose-roster-heading span { color: #dce7ef; font-size: .72rem; }
.rose-role-group { margin: 0; }
.rose-role-group h3 {
  margin: 0;
  padding: .36rem .72rem;
  border-bottom: 1px solid rgba(24,88,132,.42);
  background: #dbe5ec;
  color: #203344;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.rose-player-row {
  --role-edge: #aebbc5;
  display: grid;
  grid-template-columns: 28px 38px minmax(110px, 1fr) minmax(360px, 1.9fr);
  align-items: center;
  gap: .42rem;
  min-height: 54px;
  padding: .34rem .5rem;
  border: 0;
  border-bottom: 1px solid rgba(20, 92, 139, .22);
  border-left: 4px solid var(--role-edge);
  background: #fff;
  color: #142332;
}

.rose-player-row:nth-of-type(even) { background: #edf2f6; }
.rose-player-row.role-p { --role-edge: #d29b1d; }
.rose-player-row.role-d { --role-edge: #27895b; }
.rose-player-row.role-c { --role-edge: #3478b9; }
.rose-player-row.role-a { --role-edge: #bd4a4a; }
.rose-player-row .player-role {
  display: grid !important;
  min-width: 26px;
  height: 25px;
  place-items: center;
  padding: 0 .3rem;
  border-radius: 3px;
  color: #fff;
  font-size: .67rem;
  font-weight: 800;
}

.rose-player-row.role-p .player-role { background: #d29b1d; color: #2c2200; }
.rose-player-row.role-d .player-role { background: #27895b; }
.rose-player-row.role-c .player-role { background: #3478b9; }
.rose-player-row.role-a .player-role { background: #bd4a4a; }
.rose-player-face {
  width: 36px;
  height: 36px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid #b8c8d4;
  border-radius: 50%;
  background: #e7edf2;
}

.rose-player-name { display: grid; min-width: 0; }
.rose-player-name strong {
  overflow: hidden;
  color: #142332;
  font-size: .78rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rose-player-name small { margin-top: .08rem; color: #61717f; font-size: .63rem; }
.rose-player-stats {
  display: grid;
  grid-template-columns: repeat(8, minmax(38px, 1fr));
  gap: 2px;
  min-width: 0;
  padding: 2px;
  border: 1px solid #cfd9e1;
  border-radius: 5px;
  background: #e9eff4;
}
.rose-player-stats > span {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 3px 2px;
  border-radius: 3px;
  background: #fff;
  line-height: 1;
}
.rose-player-stats small { margin-bottom: 3px; color: #637482; font-size: .49rem; font-weight: 800; }
.rose-player-stats b {
  overflow: hidden;
  width: 100%;
  color: #203344;
  font-size: .65rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-honours-card {
  position: sticky;
  top: 78px;
  overflow: hidden;
  border: 1px solid rgba(31, 139, 207, .52);
  border-radius: 15px;
  background: linear-gradient(155deg, #083657, #031a2d 72%);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .24);
  color: #fff;
}
.team-honours-identity {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  padding: .85rem;
  border-bottom: 1px solid rgba(89, 160, 203, .28);
}
.team-honours-identity > img { width: 70px; height: 70px; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .28)); }
.team-honours-identity > div { display: grid; min-width: 0; }
.team-honours-identity span, .team-honours-identity small { color: #9fc2da; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.team-honours-identity h2 { overflow: hidden; margin: .12rem 0 .42rem; color: #fff; font-size: 1rem; line-height: 1.15; text-overflow: ellipsis; }
.team-honours-identity strong { overflow: hidden; margin-top: .06rem; color: #fff; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.team-honours-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .62rem .85rem;
  border-bottom: 1px solid rgba(229, 172, 54, .25);
  background: linear-gradient(90deg, rgba(229, 172, 54, .16), rgba(229, 172, 54, .04));
}
.team-honours-total span { color: #f3d995; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.team-honours-total b {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 218, 119, .42);
  border-radius: 50%;
  background: rgba(220, 161, 35, .18);
  color: #ffd86c;
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
}
.team-honours-list { display: grid; overflow: visible; }
.team-honours-empty { margin: 0; padding: 1.15rem; color: #b8cad7; font-size: .8rem; text-align: center; }
.team-honour-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  min-height: 78px;
  padding: .35rem .72rem;
  border-top: 1px solid rgba(86, 151, 190, .18);
}
.team-honour-row:first-child { border-top: 0; }
.team-honour-trophy { width: 56px; height: 68px; object-fit: contain; filter: drop-shadow(0 6px 7px rgba(0, 0, 0, .32)); }
.team-honour-row > div { display: grid; min-width: 0; }
.team-honour-row span { color: #8dccf4; font-size: .61rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.team-honour-row strong { margin: .05rem 0; color: #fff; font-size: .86rem; }
.team-honour-row small { color: #b8cad7; font-size: .64rem; line-height: 1.32; }

/* ==========================================================
   DESKTOP - restyling coerente con Home v500/v606
   ========================================================== */
@media (min-width: 821px) {
  html body.page-rose {
    background: linear-gradient(180deg,#eef4f9 0%,#e3edf5 100%) !important;
    color: #17324d !important;
  }

  html body.page-rose main.container {
    width: calc(100% - 32px) !important;
    max-width: 1620px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 14px !important;
  }

  /* Intestazione contesto: compatta e coerente con le card attuali. */
  html body.page-rose main.container .page-context-heading {
    margin: 0 0 12px !important;
    overflow: hidden !important;
    border: 1px solid #bdd5e8 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 5px 16px rgba(26,69,104,.06) !important;
  }
  html body.page-rose main.container .page-context-heading > header {
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    padding: 8px 16px !important;
    border: 0 !important;
    background: #fff !important;
    color: #15314f !important;
  }
  html body.page-rose main.container .page-context-heading > header > div {
    min-width: 0 !important;
  }
  html body.page-rose main.container .page-context-heading > header span {
    display: block !important;
    margin: 0 0 3px !important;
    color: #6c8398 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .045em !important;
    text-transform: uppercase !important;
  }
  html body.page-rose main.container .page-context-heading > header strong {
    display: block !important;
    color: #123a5b !important;
    font-size: 13.5px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
  }
  html body.page-rose main.container .page-context-heading > header small {
    flex: 0 0 auto !important;
    color: #60798f !important;
    font-size: 11px !important;
    font-weight: 750 !important;
  }

  /* Selettore fantasquadre: 5 + 5, card leggere come il resto del sito. */
  html body.page-rose main.container .team-tabs {
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr)) !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
  }
  html body.page-rose main.container .team-tabs > a {
    min-width: 0 !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 6px 11px !important;
    border: 1px solid #c7d9e7 !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.96) !important;
    color: #173a58 !important;
    box-shadow: 0 4px 12px rgba(26,69,104,.05) !important;
    text-decoration: none !important;
    transition: transform .16s ease,box-shadow .16s ease,border-color .16s ease !important;
  }
  html body.page-rose main.container .team-tabs > a:hover {
    transform: translateY(-1px) !important;
    border-color: #8fb9d6 !important;
    box-shadow: 0 7px 16px rgba(26,69,104,.09) !important;
  }
  html body.page-rose main.container .team-tabs > a.active {
    border-color: #174e76 !important;
    background: linear-gradient(180deg,#0c3454,#0b2d49) !important;
    color: #fff !important;
    box-shadow: 0 7px 16px rgba(17,58,91,.18) !important;
  }
  html body.page-rose main.container .team-tabs > a img {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
    object-fit: contain !important;
  }
  html body.page-rose main.container .team-tabs > a span {
    min-width: 0 !important;
    overflow: hidden !important;
    color: inherit !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body.page-rose main.container .rose-content-layout {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 320px !important;
    gap: 14px !important;
    align-items: start !important;
  }

  html body.page-rose main.container .rose-roster-panel {
    min-width: 0 !important;
    overflow: hidden !important;
    border: 1px solid #bdd5e8 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(26,69,104,.09) !important;
  }
  html body.page-rose main.container .rose-roster-heading {
    min-height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-bottom: 1px solid #2d6387 !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg,#0c3454,#0b2d49) !important;
    box-shadow: none !important;
    color: #fff !important;
  }
  html body.page-rose main.container .rose-roster-heading h2 {
    margin: 0 !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    letter-spacing: .015em !important;
  }
  html body.page-rose main.container .rose-roster-heading span {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 25px !important;
    padding: 0 9px !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.08) !important;
    color: #d7e7f3 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  html body.page-rose main.container .rose-role-group {
    margin: 0 !important;
    background: #fff !important;
  }
  html body.page-rose main.container .rose-role-group + .rose-role-group {
    border-top: 8px solid #edf4f8 !important;
  }
  html body.page-rose main.container .rose-role-group > h3 {
    min-height: 31px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #d5e2eb !important;
    background: #eef6fc !important;
    color: #55728b !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase !important;
  }

  html body.page-rose main.container .rose-player-row {
    --role-edge:#aebbc5;
    min-height: 62px !important;
    display: grid !important;
    grid-template-columns: 28px 42px minmax(165px,1.15fr) minmax(440px,1.9fr) !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 7px 12px !important;
    border: 0 !important;
    border-left: 4px solid var(--role-edge) !important;
    border-bottom: 1px solid #e1e9ef !important;
    background: #fff !important;
    color: #17324d !important;
  }
  html body.page-rose main.container .rose-role-group .rose-player-row:nth-of-type(odd) {
    background: #f8fbfd !important;
  }
  html body.page-rose main.container .rose-role-group .rose-player-row:last-child {
    border-bottom: 0 !important;
  }
  html body.page-rose main.container .rose-player-row.role-p { --role-edge:#d2a229; }
  html body.page-rose main.container .rose-player-row.role-d { --role-edge:#41966a; }
  html body.page-rose main.container .rose-player-row.role-c { --role-edge:#4b86bd; }
  html body.page-rose main.container .rose-player-row.role-a { --role-edge:#c95b61; }

  html body.page-rose main.container .rose-player-row .player-role {
    width: 25px !important;
    min-width: 25px !important;
    height: 25px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  html body.page-rose main.container .rose-player-row.role-p .player-role { background:#d2a229 !important;color:#fff !important; }
  html body.page-rose main.container .rose-player-row.role-d .player-role { background:#41966a !important; }
  html body.page-rose main.container .rose-player-row.role-c .player-role { background:#4b86bd !important; }
  html body.page-rose main.container .rose-player-row.role-a .player-role { background:#c95b61 !important; }

  html body.page-rose main.container .rose-player-face {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    object-position: top center !important;
    border: 1px solid #d4e0e8 !important;
    border-radius: 50% !important;
    background: #eef3f7 !important;
    box-shadow: none !important;
  }
  html body.page-rose main.container .rose-player-name {
    display: grid !important;
    align-content: center !important;
    min-width: 0 !important;
  }
  html body.page-rose main.container .rose-player-name strong {
    overflow: hidden !important;
    color: #17324d !important;
    font-size: 12.5px !important;
    font-weight: 650 !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body.page-rose main.container .rose-player-name > small {
    margin-top: 3px !important;
    color: #75899a !important;
    font-size: 9.5px !important;
    font-weight: 650 !important;
    line-height: 1 !important;
  }
  html body.page-rose main.container .player-history-trigger {
    width: max-content !important;
    min-height: 0 !important;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #2c79b9 !important;
    font-size: 8.5px !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    text-decoration: none !important;
    cursor: pointer !important;
  }

  html body.page-rose main.container .rose-player-stats {
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(8,minmax(46px,1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #d8e3eb !important;
    border-radius: 9px !important;
    background: #f2f7fa !important;
  }
  html body.page-rose main.container .rose-player-stats > span {
    min-width: 0 !important;
    min-height: 42px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 4px 3px !important;
    border: 0 !important;
    border-left: 1px solid #dde7ee !important;
    border-radius: 0 !important;
    background: transparent !important;
    line-height: 1 !important;
  }
  html body.page-rose main.container .rose-player-stats > span:first-child {
    border-left: 0 !important;
  }
  html body.page-rose main.container .rose-player-stats small {
    margin: 0 !important;
    color: #8091a0 !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .01em !important;
  }
  html body.page-rose main.container .rose-player-stats b {
    overflow: hidden !important;
    width: 100% !important;
    color: #173a58 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Profilo e palmares: chiaro e compatto, niente blocco blu notte. */
  html body.page-rose main.container .team-honours-card {
    display: block !important;
    position: sticky !important;
    top: 92px !important;
    grid-column: 2 !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: 1px solid #bdd5e8 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(26,69,104,.09) !important;
    color: #17324d !important;
  }
  html body.page-rose main.container .team-honours-identity {
    min-height: 92px !important;
    display: grid !important;
    grid-template-columns: 66px minmax(0,1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 13px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #dce7ef !important;
    background: #fff !important;
  }
  html body.page-rose main.container .team-honours-identity > img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    filter: none !important;
  }
  html body.page-rose main.container .team-honours-identity > div {
    display: grid !important;
    min-width: 0 !important;
  }
  html body.page-rose main.container .team-honours-identity span,
  html body.page-rose main.container .team-honours-identity small {
    color: #7d91a3 !important;
    font-size: 8.5px !important;
    font-weight: 850 !important;
    letter-spacing: .055em !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
  }
  html body.page-rose main.container .team-honours-identity h2 {
    overflow: hidden !important;
    margin: 3px 0 8px !important;
    color: #123a5b !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body.page-rose main.container .team-honours-identity strong {
    overflow: hidden !important;
    margin-top: 2px !important;
    color: #294960 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body.page-rose main.container .team-honours-total {
    min-height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #d8e5ee !important;
    background: #eef6fc !important;
  }
  html body.page-rose main.container .team-honours-total span {
    color: #55728b !important;
    font-size: 9.5px !important;
    font-weight: 900 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase !important;
  }
  html body.page-rose main.container .team-honours-total b {
    width: 28px !important;
    height: 28px !important;
    flex: 0 0 28px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 1px solid #bad4e6 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #123a5b !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  html body.page-rose main.container .team-honours-list {
    display: grid !important;
    overflow: visible !important;
    background: #fff !important;
  }
  html body.page-rose main.container .team-honours-empty {
    margin: 0 !important;
    padding: 18px 14px !important;
    color: #8192a0 !important;
    font-size: 10.5px !important;
    text-align: center !important;
  }
  html body.page-rose main.container .team-honour-row {
    min-height: 66px !important;
    display: grid !important;
    grid-template-columns: 48px minmax(0,1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 12px !important;
    border: 0 !important;
    border-top: 1px solid #e2eaf0 !important;
    background: #fff !important;
  }
  html body.page-rose main.container .team-honour-row:first-child {
    border-top: 0 !important;
  }
  html body.page-rose main.container .team-honour-trophy {
    width: 44px !important;
    height: 50px !important;
    object-fit: contain !important;
    filter: none !important;
  }
  html body.page-rose main.container .team-honour-row > div {
    display: grid !important;
    min-width: 0 !important;
  }
  html body.page-rose main.container .team-honour-row span {
    color: #2e6f9f !important;
    font-size: 9px !important;
    font-weight: 850 !important;
    letter-spacing: .02em !important;
    text-transform: uppercase !important;
  }
  html body.page-rose main.container .team-honour-row strong {
    margin: 2px 0 !important;
    color: #173a58 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.1 !important;
  }
  html body.page-rose main.container .team-honour-row small {
    color: #7d8e9d !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  html body.page-rose main.container .rose-content-layout {
    grid-template-columns: minmax(0,1fr) 285px !important;
  }
  html body.page-rose main.container .rose-player-row {
    grid-template-columns: 28px 40px minmax(150px,1fr) !important;
  }
  html body.page-rose main.container .rose-player-stats {
    grid-column: 2 / 4 !important;
    width: 100% !important;
    margin-top: 1px !important;
  }
}

/* Mobile: comportamento precedente invariato. */
@media (max-width: 820px) {
  .rose-content-layout { grid-template-columns: 1fr; }
  .team-honours-card { display: none !important; }
  .rose-player-row { grid-template-columns: 27px 36px minmax(0, 1fr); gap: .42rem; padding: .36rem .48rem; }
  .rose-player-stats { grid-template-columns: repeat(4, minmax(42px, 1fr)); grid-column: 2 / 4; width: 100%; }
  .rose-player-face { width: 34px; height: 34px; }
  .team-honours-list { grid-template-columns: 1fr; }
  .team-honour-row:nth-child(even) { border-left: 0; }
  .team-honours-identity { grid-template-columns: 68px minmax(0, 1fr); }
  .team-honours-identity > img { width: 68px; height: 68px; }
}

/* ==========================================================
   v2 - Allineamento Rose al design attuale
   - rimossi badge P/D/C/A
   - barre ruolo sottili
   - blu notte sostituito con il blu attuale del sito
   - statistiche sempre contenute nella card
   ========================================================== */
@media (min-width:821px){
  /* Colore principale gia' usato nel sito attuale */
  html body.page-rose main.container .team-tabs > a.active,
  html body.page-rose main.container .rose-roster-heading{
    background:#1684f6!important;
    border-color:#1684f6!important;
  }

  html body.page-rose main.container .rose-roster-heading{
    border-bottom:0!important;
  }

  html body.page-rose main.container .rose-roster-heading span{
    border-color:rgba(255,255,255,.28)!important;
    background:rgba(255,255,255,.14)!important;
    color:#fff!important;
  }

  /* Niente sigle P / D / C / A. Il ruolo resta indicato dalla linea laterale. */
  html body.page-rose main.container .rose-player-row .player-role{
    display:none!important;
  }

  html body.page-rose main.container .rose-player-row{
    grid-template-columns:42px minmax(145px,.9fr) minmax(0,2.25fr)!important;
    gap:9px!important;
    border-left-width:2px!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }

  /* Statistiche elastiche: nessuna colonna forza la tabella oltre la card. */
  html body.page-rose main.container .rose-player-stats{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
    overflow:hidden!important;
  }

  html body.page-rose main.container .rose-player-stats > span{
    min-width:0!important;
    padding:4px 1px!important;
  }

  html body.page-rose main.container .rose-player-stats small{
    max-width:100%!important;
    overflow:hidden!important;
    font-size:7.5px!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  html body.page-rose main.container .rose-player-stats b{
    max-width:100%!important;
    min-width:0!important;
    font-size:10px!important;
  }

  /* Colonna rosa piu' generosa, pannello laterale leggermente piu' compatto. */
  html body.page-rose main.container .rose-content-layout{
    grid-template-columns:minmax(0,1fr) 300px!important;
  }

  /* Anche il pannello laterale evita il vecchio blu notte. */
  html body.page-rose main.container .team-honours-card{
    background:#fff!important;
    color:#17324d!important;
  }
}

/* ==========================================================
   v3 - Allineamento definitivo al design system desktop attuale
   Home / Live / Risultati: header card #eef3f6, testo #092b49.
   Include anche header e footer desktop della nuova UI.
   ========================================================== */
@media (min-width:821px){
  html body.page-rose{
    background:linear-gradient(180deg,var(--lofe-ds-bg-1,#eef4f9) 0%,var(--lofe-ds-bg-2,#e3edf5) 100%)!important;
    color:var(--lofe-ds-text,#102f4f)!important;
  }

  /* HEADER desktop uguale alla nuova Home */
  html body.page-rose .site-header{
    box-sizing:border-box!important;
    position:relative!important;
    display:flex!important;
    min-height:78px!important;
    align-items:center!important;
    overflow:hidden!important;
    padding-left:0!important;
    padding-right:max(16px,calc((100vw - 1620px)/2 + 16px))!important;
    border-bottom:1px solid #d5e0e8!important;
    background:rgba(250,252,254,.98)!important;
    box-shadow:0 5px 18px rgba(17,52,82,.07)!important;
    backdrop-filter:blur(10px)!important;
  }
  html body.page-rose .site-header .brand-v2{
    box-sizing:border-box!important;
    position:relative!important;
    align-self:stretch!important;
    display:flex!important;
    flex:0 0 auto!important;
    width:calc(max(16px,calc((100vw - 1620px)/2 + 16px)) + 330px)!important;
    min-width:365px!important;
    height:78px!important;
    align-items:center!important;
    justify-content:flex-start!important;
    margin:0 20px 0 0!important;
    padding-left:max(8px,calc((100vw - 1620px)/2 + 8px))!important;
    padding-right:78px!important;
    border:0!important;
    border-radius:0!important;
    background:linear-gradient(90deg,#031a29 0%,#031c2f 54%,#031e35 100%)!important;
    box-shadow:none!important;
    clip-path:polygon(0 0,100% 0,88% 100%,0 100%)!important;
    text-decoration:none!important;
  }
  html body.page-rose .site-header .brand-v2::after{
    content:""!important;
    position:absolute!important;
    top:0!important;
    right:9%!important;
    width:1px!important;
    height:100%!important;
    background:linear-gradient(180deg,transparent,rgba(255,255,255,.22),transparent)!important;
    opacity:.28!important;
    transform:skewX(-12deg)!important;
    pointer-events:none!important;
  }
  html body.page-rose .site-header .brand-v2 .lofe-logo-img{
    display:block!important;
    width:auto!important;
    height:58px!important;
    max-width:245px!important;
    max-height:58px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    object-fit:contain!important;
    object-position:center!important;
    filter:none!important;
    mix-blend-mode:normal!important;
    box-shadow:none!important;
  }
  html body.page-rose .site-header .nav{
    display:flex!important;
    min-width:0!important;
    flex:1 1 auto!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:2px!important;
    margin-left:0!important;
  }
  html body.page-rose .site-header .nav a,
  html body.page-rose .site-header .nav button{
    min-height:36px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0 10px!important;
    border:0!important;
    border-radius:8px!important;
    background:transparent!important;
    color:#183b5b!important;
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    font-size:12.5px!important;
    font-weight:650!important;
    line-height:1!important;
    text-decoration:none!important;
    box-shadow:none!important;
  }
  html body.page-rose .site-header .nav a:hover,
  html body.page-rose .site-header .nav button:hover{
    background:#e8f1f7!important;
    color:#0b5ea7!important;
  }
  html body.page-rose .site-header .nav a.active{
    background:#dfeefa!important;
    color:#0b5ea7!important;
    box-shadow:inset 0 0 0 1px #c8ddec!important;
  }
  html body.page-rose .site-header .nav-profile{
    margin-left:8px!important;
    padding-left:10px!important;
    border-left:1px solid #d7e1e8!important;
  }

  /* FOOTER desktop uguale alla nuova Home */
  html body.page-rose #lofe-main .site-footer-v2{
    box-sizing:border-box!important;
    width:100vw!important;
    margin:36px 0 0 calc(50% - 50vw)!important;
    padding:18px max(16px,calc((100vw - 1620px)/2 + 16px))!important;
    display:grid!important;
    grid-template-columns:1fr auto auto!important;
    align-items:center!important;
    gap:18px!important;
    border-top:1px solid #cfdbe4!important;
    background:#dfe8ef!important;
    color:#29445d!important;
    box-shadow:none!important;
  }
  html body.page-rose #lofe-main .site-footer-v2 .site-footer__identity{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
  }
  html body.page-rose #lofe-main .site-footer-v2 .lofe-logo-footer{
    width:auto!important;
    height:36px!important;
    max-height:36px!important;
    object-fit:contain!important;
  }
  html body.page-rose #lofe-main .site-footer-v2 .site-footer__identity small,
  html body.page-rose #lofe-main .site-footer-v2 .site-footer__legal,
  html body.page-rose #lofe-main .site-footer-v2 .site-footer__version{
    color:#536a7f!important;
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    font-size:11px!important;
    font-weight:600!important;
    line-height:1.2!important;
  }
  html body.page-rose #lofe-main .site-footer-v2 .site-footer__legal{text-align:center!important;}
  html body.page-rose #lofe-main .site-footer-v2 .site-footer__version{white-space:nowrap!important;text-align:right!important;}

  /* Card: niente blu notte e niente azzurro acceso. Usa il grigio-azzurro reale delle card Home/Risultati. */
  html body.page-rose main.container .page-context-heading,
  html body.page-rose main.container .rose-roster-panel,
  html body.page-rose main.container .team-honours-card{
    border-color:var(--lofe-ds-border,#d7e0e8)!important;
    border-radius:var(--lofe-ds-radius,15px)!important;
    background:var(--lofe-ds-surface-soft,#f7f9fb)!important;
    box-shadow:var(--lofe-ds-shadow,0 6px 18px rgba(15,42,68,.06))!important;
  }

  html body.page-rose main.container .page-context-heading > header,
  html body.page-rose main.container .rose-roster-heading,
  html body.page-rose main.container .team-honours-total{
    min-height:48px!important;
    border-color:var(--lofe-ds-border,#d7e0e8)!important;
    background:var(--lofe-ds-header,#eef3f6)!important;
    color:var(--lofe-ds-text-strong,#092b49)!important;
  }
  html body.page-rose main.container .rose-roster-heading{
    border-bottom:1px solid var(--lofe-ds-border,#d7e0e8)!important;
  }
  html body.page-rose main.container .rose-roster-heading h2{
    color:var(--lofe-ds-text-strong,#092b49)!important;
    font-size:13.5px!important;
    font-weight:850!important;
    letter-spacing:.025em!important;
    text-transform:uppercase!important;
  }
  html body.page-rose main.container .rose-roster-heading span{
    min-height:24px!important;
    border:1px solid #c8dced!important;
    background:#fff!important;
    color:#526a80!important;
  }

  html body.page-rose main.container .page-context-heading > header span,
  html body.page-rose main.container .page-context-heading > header small{
    color:var(--lofe-ds-muted,#526a80)!important;
  }
  html body.page-rose main.container .page-context-heading > header strong{
    color:var(--lofe-ds-text-strong,#092b49)!important;
  }

  /* Selettore squadre nello stesso linguaggio cromatico della navigazione/card. */
  html body.page-rose main.container .team-tabs > a{
    border-color:var(--lofe-ds-border,#d7e0e8)!important;
    background:#fff!important;
    color:var(--lofe-ds-text,#102f4f)!important;
    box-shadow:var(--lofe-ds-shadow,0 6px 18px rgba(15,42,68,.06))!important;
  }
  html body.page-rose main.container .team-tabs > a:hover{
    transform:translateY(-1px)!important;
    border-color:#c8ddec!important;
    background:#f8fbfd!important;
    box-shadow:var(--lofe-ds-shadow-strong,0 8px 22px rgba(26,69,104,.07))!important;
  }
  html body.page-rose main.container .team-tabs > a.active{
    border-color:#c8ddec!important;
    background:#dfeefa!important;
    color:#0b5ea7!important;
    box-shadow:inset 0 0 0 1px #c8ddec!important;
  }

  /* Intestazioni reparti: stesso #eef3f6 delle card, non celeste. */
  html body.page-rose main.container .rose-role-group + .rose-role-group{
    border-top:8px solid #e7eef3!important;
  }
  html body.page-rose main.container .rose-role-group > h3{
    border-bottom:1px solid var(--lofe-ds-border,#d7e0e8)!important;
    background:var(--lofe-ds-header,#eef3f6)!important;
    color:var(--lofe-ds-text-strong,#092b49)!important;
  }

  /* Righe giocatori: la sigla ruolo resta nascosta, solo linea sottile da 2px. */
  html body.page-rose main.container .rose-player-row{
    grid-template-columns:40px minmax(115px,.72fr) minmax(0,2.5fr)!important;
    gap:8px!important;
    min-width:0!important;
    overflow:hidden!important;
    border-left-width:2px!important;
    border-bottom-color:#e1e8ee!important;
    padding:6px 9px!important;
    background:#fff!important;
  }
  html body.page-rose main.container .rose-role-group .rose-player-row:nth-of-type(odd){
    background:#f8fafc!important;
  }
  html body.page-rose main.container .rose-player-row .player-role{display:none!important;}
  html body.page-rose main.container .rose-player-row.role-p{--role-edge:var(--lofe-ds-role-p,#f0a51a)!important;}
  html body.page-rose main.container .rose-player-row.role-d{--role-edge:var(--lofe-ds-role-d,#2f8a44)!important;}
  html body.page-rose main.container .rose-player-row.role-c{--role-edge:var(--lofe-ds-role-c,#1680bf)!important;}
  html body.page-rose main.container .rose-player-row.role-a{--role-edge:var(--lofe-ds-role-a,#cf424b)!important;}

  /* Dati sempre dentro la riga/card. */
  html body.page-rose main.container .rose-player-stats{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
    overflow:hidden!important;
    border-color:#d7e0e8!important;
    background:#f7f9fb!important;
  }
  html body.page-rose main.container .rose-player-stats > span{
    box-sizing:border-box!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    padding:4px 1px!important;
    border-left-color:#dfe6ec!important;
  }
  html body.page-rose main.container .rose-player-stats small{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
    color:#718596!important;
    font-size:7px!important;
    text-align:center!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  html body.page-rose main.container .rose-player-stats b{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    color:#15314e!important;
    font-size:10px!important;
    text-align:center!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  /* Pannello squadra/palmares chiaro come le altre card. */
  html body.page-rose main.container .team-honours-identity{
    border-bottom:1px solid var(--lofe-ds-border,#d7e0e8)!important;
    background:#fff!important;
  }
  html body.page-rose main.container .team-honours-total{
    border-bottom:1px solid var(--lofe-ds-border,#d7e0e8)!important;
  }
  html body.page-rose main.container .team-honours-total span{
    color:var(--lofe-ds-text-strong,#092b49)!important;
  }
  html body.page-rose main.container .team-honours-list,
  html body.page-rose main.container .team-honour-row{
    background:#fff!important;
  }

  /* Diamo piu spazio alla rosa; il pannello laterale resta compatto. */
  html body.page-rose main.container .rose-content-layout{
    grid-template-columns:minmax(0,1fr) 286px!important;
    gap:14px!important;
  }
}

@media (min-width:821px) and (max-width:1280px){
  html body.page-rose main.container .rose-content-layout{
    grid-template-columns:minmax(0,1fr) 250px!important;
  }
  html body.page-rose main.container .rose-player-row{
    grid-template-columns:38px minmax(105px,.65fr) minmax(0,2.7fr)!important;
    gap:7px!important;
    padding-left:7px!important;
    padding-right:7px!important;
  }
  html body.page-rose main.container .rose-player-face{
    width:36px!important;
    height:36px!important;
  }
  html body.page-rose main.container .rose-player-stats small{font-size:6.5px!important;}
  html body.page-rose main.container .rose-player-stats b{font-size:9px!important;}
}

/* ==========================================================
   ROSE v4 - nomi piu leggibili + statistiche compatte
   Desktop only
   ========================================================== */
@media (min-width:821px){
  /* Il nome del giocatore non deve essere in grassetto. */
  html body.page-rose main.container .rose-player-name strong{
    font-weight:400!important;
    font-size:12px!important;
    line-height:1.08!important;
    color:#0d2f50!important;
  }

  /* Piu spazio al nome, blocco statistiche molto piu stretto a destra. */
  html body.page-rose main.container .rose-player-row{
    grid-template-columns:40px minmax(170px,1fr) minmax(350px,430px)!important;
    column-gap:10px!important;
  }
  html body.page-rose main.container .rose-player-stats{
    width:100%!important;
    max-width:430px!important;
    justify-self:end!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
  }
  html body.page-rose main.container .rose-player-stats > span{
    min-height:42px!important;
    padding:3px 1px!important;
  }
  html body.page-rose main.container .rose-player-stats small{
    font-size:6.5px!important;
    line-height:1!important;
  }
  html body.page-rose main.container .rose-player-stats b{
    margin-top:3px!important;
    font-size:9.5px!important;
    line-height:1!important;
  }
}

@media (min-width:821px) and (max-width:1280px){
  html body.page-rose main.container .rose-player-row{
    grid-template-columns:36px minmax(145px,1fr) minmax(320px,380px)!important;
    column-gap:8px!important;
  }
  html body.page-rose main.container .rose-player-stats{
    max-width:380px!important;
  }
}

/* ==========================================================
   ROSE v5 - blocco statistiche ancora piu compatto
   Desktop only
   ========================================================== */
@media (min-width:821px){
  html body.page-rose main.container .rose-player-row{
    grid-template-columns:40px minmax(190px,1fr) minmax(300px,350px)!important;
    column-gap:9px!important;
  }
  html body.page-rose main.container .rose-player-stats{
    width:350px!important;
    max-width:350px!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
  }
  html body.page-rose main.container .rose-player-stats > span{
    min-height:40px!important;
    padding:3px 0!important;
  }
  html body.page-rose main.container .rose-player-stats small{
    font-size:7px!important;
    line-height:1!important;
  }
  html body.page-rose main.container .rose-player-stats b{
    margin-top:3px!important;
    font-size:10.5px!important;
    line-height:1!important;
  }
}

@media (min-width:821px) and (max-width:1280px){
  html body.page-rose main.container .rose-player-row{
    grid-template-columns:36px minmax(165px,1fr) minmax(285px,320px)!important;
    column-gap:7px!important;
  }
  html body.page-rose main.container .rose-player-stats{
    width:320px!important;
    max-width:320px!important;
  }
  html body.page-rose main.container .rose-player-stats small{font-size:6.7px!important;}
  html body.page-rose main.container .rose-player-stats b{font-size:10px!important;}
}
