/* ==========================================================================
   LEGA CALCETTO — design system
   Stile "matchday broadcast": blu chiaro dominante, tagli diagonali,
   numeri condensati in corsivo, dettagli giallo evidenziatore.
   ========================================================================== */

:root {
  --navy-950: #030E24;
  --navy-900: #061A3D;
  --navy-800: #0A2A5E;
  --blue-800: #0A3F8F;
  --blue-700: #0A5BC2;
  --sky-600: #0C86D6;
  --sky-500: #19A3F0;
  --sky-400: #3FB8FA;
  --sky-300: #7FD0FF;
  --sky-200: #B8E4FF;
  --sky-100: #DDF2FF;
  --sky-50: #EEF8FF;

  --yellow: #FFD400;
  --yellow-300: #FFE45C;
  --yellow-600: #E0B400;
  --yellow-50: #FFF8D6;

  --ok: #10B96F;
  --ok-2: #0A9B5B;
  --ok-50: #E4F8EE;
  --maybe: #FFC300;
  --maybe-50: #FFF6D6;
  --no: #F0445A;
  --no-50: #FDE8EB;
  --free: #D5E0EC;

  --gold-1: #FFE680;
  --gold-2: #F5B800;
  --silver-1: #F1F5FA;
  --silver-2: #A9BCD0;
  --bronze-1: #F6C59B;
  --bronze-2: #C0773A;

  --ink: #0A1A33;
  --ink-2: #3B4D68;
  --ink-3: #7285A0;
  --ink-4: #A7B5C8;
  --line: #E2EAF3;
  --line-2: #EDF2F8;
  --card: #FFFFFF;
  --bg: #EDF5FC;

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;

  --sh-1: 0 1px 2px rgba(6, 26, 61, .05), 0 6px 20px -8px rgba(6, 26, 61, .12);
  --sh-2: 0 2px 6px rgba(6, 26, 61, .06), 0 20px 50px -18px rgba(10, 63, 143, .35);
  --sh-y: 0 10px 30px -10px rgba(224, 180, 0, .65);

  --grad-hero: linear-gradient(128deg, #0A3F96 0%, #0C63CC 30%, #1590EA 62%, #3DB9FA 86%, #6AD2FF 100%);
  --grad-sky: linear-gradient(135deg, #0A5BC2 0%, #19A3F0 100%);
  --grad-y: linear-gradient(135deg, #FFE45C 0%, #FFD400 45%, #F2BE00 100%);
  --stripes: repeating-linear-gradient(115deg, rgba(255, 255, 255, .065) 0 1px, transparent 1px 18px);

  --f: 'Saira', 'Avenir Next Condensed', 'Arial Narrow', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --tabbar-h: 74px;
  --side-w: 260px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--f);
  font-stretch: 96%;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 110% 20%, rgba(127, 208, 255, .28), transparent 60%),
    radial-gradient(900px 500px at -20% 70%, rgba(25, 163, 240, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--blue-700); text-decoration: none; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--yellow); color: var(--navy-900); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- tipografia display ---------- */
.d,
.d-it {
  font-family: var(--f);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .95;
}
.d-it { font-style: italic; }
.num {
  font-stretch: 60%;
  font-style: italic;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- icone ---------- */
.i {
  width: var(--is, 20px);
  height: var(--is, 20px);
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   BOOT & AUTH
   ========================================================================== */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--grad-hero);
}
.boot-logo {
  width: 112px;
  height: 112px;
  background: url(/icons/lc-icon-192.png) center / contain no-repeat;
  animation: pulse 1.2s var(--ease) infinite alternate;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35));
}
@keyframes pulse { from { transform: scale(.92); } to { transform: scale(1.04); } }

.auth {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--grad-hero);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.auth::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--stripes);
  z-index: -1;
}
.auth-slash {
  position: absolute;
  z-index: -1;
  top: -20%;
  right: 12%;
  width: 120px;
  height: 160%;
  background: var(--grad-y);
  transform: skewX(-24deg);
  box-shadow: 0 0 80px rgba(255, 212, 0, .35);
}
.auth-slash.two { right: calc(12% - 70px); width: 22px; background: rgba(255, 255, 255, .22); box-shadow: none; }
.auth-glow {
  position: absolute;
  z-index: -1;
  width: 70vmax;
  height: 70vmax;
  right: -30vmax;
  bottom: -35vmax;
  background: radial-gradient(circle, rgba(127, 208, 255, .55), transparent 60%);
}
.auth-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 20px 90px;
  display: grid;
  gap: 32px;
  align-content: center;
}
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand img { width: 76px; height: 76px; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .35)); }
.auth-brand .d-it { font-size: 26px; }
.auth-brand small { display: block; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; opacity: .75; font-weight: 600; }
.auth-hero h1 {
  margin: 0;
  font-size: clamp(54px, 13vw, 118px);
  line-height: .86;
  text-shadow: 0 10px 40px rgba(3, 14, 36, .35);
}
.auth-hero h1 span { color: var(--yellow); display: block; }
.auth-hero p { max-width: 460px; font-size: 16.5px; opacity: .88; margin: 18px 0 0; }
.auth-card {
  background: rgba(255, 255, 255, .97);
  color: var(--ink);
  border-radius: var(--r-xl);
  padding: 8px;
  box-shadow: 0 40px 80px -30px rgba(3, 14, 36, .6);
  width: min(440px, 100%);
  justify-self: center;
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--sky-50); padding: 5px; border-radius: 20px; }
.auth-tabs button {
  height: 44px;
  border-radius: 16px;
  font-weight: 700;
  font-stretch: 75%;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-3);
  transition: .25s var(--ease);
}
.auth-tabs button[aria-selected='true'] { background: #fff; color: var(--blue-700); box-shadow: var(--sh-1); }
.auth-form { padding: 22px 18px 18px; display: grid; gap: 14px; }
.auth-form .btn { margin-top: 6px; }
.auth-foot { font-size: 12.5px; color: var(--ink-3); text-align: center; padding: 0 18px 14px; }
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  background: var(--yellow);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  overflow: hidden;
  transform: skewY(-1.2deg);
  transform-origin: left;
}
.ticker-track {
  display: flex;
  gap: 42px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  padding-left: 42px;
  font-size: 18px;
}
.ticker-track span::after { content: '◆'; margin-left: 42px; font-size: 11px; vertical-align: middle; }
@keyframes ticker { to { transform: translateX(-50%); } }

@media (min-width: 960px) {
  .auth-inner { grid-template-columns: 1.15fr .85fr; align-items: center; min-height: 100dvh; }
  .auth-brand { grid-column: 1 / -1; align-self: start; }
  .auth-card { justify-self: end; }
}

/* ==========================================================================
   SHELL
   ========================================================================== */
.shell { min-height: 100dvh; }
.main-wrap { position: relative; min-height: 100dvh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); }

.band {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: 0;
  height: var(--band-h, 300px);
  background: var(--grad-hero);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
  overflow: hidden;
  transition: height .5s var(--ease);
}
.band::before { content: ''; position: absolute; inset: 0; background: var(--stripes); }
.band::after {
  content: '';
  position: absolute;
  right: -34px;
  top: -30%;
  width: 54px;
  height: 180%;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 75%);
  background: var(--grad-y);
  transform: skewX(-24deg);
  opacity: .95;
  box-shadow: -40px 0 0 -26px rgba(255, 255, 255, .35);
}
.band .band-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  right: -200px;
  top: -300px;
  background: radial-gradient(circle, rgba(127, 208, 255, .6), transparent 65%);
}
.shell[data-band='tall'] .band { --band-h: 610px; clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); }
.shell[data-band='mid'] .band { --band-h: 380px; }

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  color: #fff;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.appbar.scrolled {
  background: rgba(6, 26, 61, .82);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 10px 30px -18px rgba(3, 14, 36, .8);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.brand img { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.brand .d-it { font-size: 21px; line-height: 1; }
.brand small { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .8; font-weight: 600; font-style: normal; font-stretch: 100%; white-space: nowrap; }
.brand > div { min-width: 0; }
.brand .d-it { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .sp { flex: 1; }
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  white-space: nowrap;
  flex: none;
}
.live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3BF08F; box-shadow: 0 0 0 0 rgba(59, 240, 143, .7); animation: ping 1.8s infinite; }
.live-dot.off::before { background: var(--ink-4); animation: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(59, 240, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 240, 143, 0); } }
.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  transition: .2s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--yellow);
  color: var(--navy-900);
  font-size: 11.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--blue-700);
  animation: pop .4s var(--spring);
}
.me-btn { border-radius: 50%; padding: 2px; background: rgba(255, 255, 255, .2); transition: background .2s, box-shadow .2s, transform .2s var(--spring); }
.me-btn:active { transform: scale(.94); }
/* sul proprio profilo le iniziali si accendono di giallo (il profilo non è più nella barra in basso) */
.me-btn[aria-current='page'] { background: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 212, 0, .35); }
.me-btn[aria-current='page'] .av { box-shadow: 0 0 0 2px var(--yellow), 0 4px 10px -4px rgba(6, 26, 61, .4); }

.view {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 6px 16px 0;
}

/* page head */
.phead { color: #fff; padding: 14px 2px 22px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.phead-txt { flex: 1; min-width: 220px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.kicker::before { content: ''; width: 22px; height: 6px; background: var(--yellow); transform: skewX(-24deg); border-radius: 1px; }
.phead h1 { margin: 8px 0 0; font-size: clamp(44px, 11vw, 76px); text-shadow: 0 8px 30px rgba(3, 14, 36, .3); }
.phead h1 em { color: var(--yellow); font-style: italic; }
.phead p { margin: 8px 0 0; opacity: .85; max-width: 560px; }

/* navigazione mobile */
.tabbar {
  position: fixed;
  z-index: 40;
  left: 10px;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  height: 64px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  padding: 0 6px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  box-shadow: 0 20px 40px -14px rgba(6, 26, 61, .35), 0 0 0 1px rgba(6, 26, 61, .04);
}
.tab {
  position: relative;
  height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: var(--ink-3);
  border-radius: 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-stretch: 80%;
  transition: color .2s;
}
.tab .i { --is: 23px; transition: transform .35s var(--spring); }
.tab[aria-current='page'] { color: var(--blue-700); }
.tab[aria-current='page'] .i { transform: translateY(-2px) scale(1.08); }
.tab[aria-current='page']::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 16px;
  height: 4px;
  border-radius: 3px;
  background: var(--yellow);
  transform: skewX(-24deg);
}
.tab .dot { position: absolute; top: 7px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--no); box-shadow: 0 0 0 2px #fff; }

/* sidebar desktop */
.side { display: none; }

@media (min-width: 700px) {
  .band::after { right: 8%; width: 70px; }
}
@media (max-width: 420px) {
  .live-dot { padding: 6px 8px; font-size: 10.5px; }
  .brand small { letter-spacing: .12em; }
}

@media (min-width: 1080px) {
  .shell { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .tabbar { display: none; }
  .main-wrap { padding-bottom: 48px; }
  .side {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 24px 16px;
    background: linear-gradient(180deg, var(--navy-900), #072556 60%, #0A3576);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
  }
  .side::before { content: ''; position: absolute; inset: 0; background: var(--stripes); z-index: -1; }
  .side::after { content: ''; position: absolute; left: -40px; bottom: -40px; width: 36px; height: 320px; background: var(--grad-y); transform: skewX(-24deg); z-index: -1; opacity: .9; }
  .side .brand { padding: 0 8px 26px; }
  .side .brand img { width: 52px; height: 52px; }
  .side .brand .d-it { font-size: 24px; }
  .side nav { display: grid; gap: 4px; }
  .side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, .72);
    font-weight: 700;
    font-stretch: 80%;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: .05em;
    transition: .2s var(--ease);
    position: relative;
  }
  .side-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
  .side-link[aria-current='page'] { color: #fff; background: linear-gradient(90deg, rgba(25, 163, 240, .35), rgba(25, 163, 240, .08)); }
  .side-link[aria-current='page']::before { content: ''; position: absolute; left: -16px; width: 6px; height: 26px; background: var(--yellow); border-radius: 0 4px 4px 0; }
  .side-link .count { margin-left: auto; font-size: 11px; background: var(--yellow); color: var(--navy-900); border-radius: 99px; padding: 2px 8px; }
  .side-foot { margin-top: auto; display: grid; gap: 10px; }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .07); color: #fff; }
  .side-user:hover { background: rgba(255, 255, 255, .12); }
  .side-user[aria-current='page'] { background: rgba(255, 212, 0, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 212, 0, .6); }
  .side-user b { display: block; font-size: 14px; }
  .side-user small { opacity: .7; font-size: 12px; }
  .appbar .brand { visibility: hidden; }
  .view { padding: 6px 32px 0; }
}

/* ==========================================================================
   COMPONENTI BASE
   ========================================================================== */
.card {
  position: relative;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  border: 1px solid rgba(10, 63, 143, .06);
  padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 28px; }
.card-h h2,
.card-h h3 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.card-h h2::before,
.card-h h3::before { content: ''; width: 5px; height: 20px; background: var(--yellow); transform: skewX(-20deg); border-radius: 1px; box-shadow: 3px 0 0 var(--sky-500); }
.card-h .sp { flex: 1; }
.card-sub { color: var(--ink-3); font-size: 13px; margin: -8px 0 14px; }

.grid { display: grid; gap: 16px; }
.grid > .card + .card, .col > .card + .card { margin-top: 0; }
.col { display: grid; gap: 16px; align-content: start; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: start; }
  .grid-2e { grid-template-columns: 1fr 1fr; align-items: start; }
}

.btn {
  --bh: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--bh);
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 700;
  font-stretch: 80%;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  background: var(--grad-sky);
  box-shadow: 0 10px 22px -10px rgba(10, 91, 194, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s var(--ease), box-shadow .2s, filter .2s, opacity .2s;
  white-space: nowrap;
  overflow: hidden;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.y { background: var(--grad-y); color: var(--navy-900); box-shadow: var(--sh-y), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.navy { background: var(--navy-900); box-shadow: 0 10px 22px -12px rgba(6, 26, 61, .8); }
.btn.ghost { background: var(--sky-50); color: var(--blue-700); box-shadow: none; border: 1px solid var(--sky-100); }
.btn.ghost:hover { background: var(--sky-100); }
.btn.line { background: transparent; color: var(--ink); box-shadow: none; border: 1.5px solid var(--line); }
.btn.danger { background: var(--no-50); color: var(--no); box-shadow: none; }
.btn.glass { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); box-shadow: none; backdrop-filter: blur(8px); }
.btn.glass:hover { background: rgba(255, 255, 255, .22); }
.btn.sm { --bh: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.xs { --bh: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; gap: 5px; }
.btn.xs .i { --is: 15px; }
.btn .i { --is: 19px; }
.btn.loading { color: transparent !important; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn.y.loading::after, .btn.ghost.loading::after, .btn.line.loading::after { border-color: rgba(6, 26, 61, .2); border-top-color: var(--navy-900); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--sky-50);
  color: var(--blue-700);
  border: 1px solid var(--sky-100);
  white-space: nowrap;
}
.chip .i { --is: 14px; }
.chip.y { background: var(--yellow-50); border-color: #FFE88A; color: #7A5B00; }
.chip.ok { background: var(--ok-50); border-color: #BDEBD3; color: var(--ok-2); }
.chip.no { background: var(--no-50); border-color: #F9C6CE; color: #C42840; }
.chip.dark { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; }
.chip.solid-y { background: var(--yellow); border-color: var(--yellow); color: var(--navy-900); font-weight: 800; }
button.chip { cursor: pointer; transition: .2s var(--ease); }
button.chip[aria-pressed='true'] { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

.tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--line-2); color: var(--ink-3); vertical-align: middle; }
.tag.y { background: var(--yellow); color: var(--navy-900); }
.tag .i { --is: 11px; stroke-width: 2.6; vertical-align: -1px; margin-right: 2px; }
.tag.sky { background: var(--sky-100); color: var(--blue-700); }

/* avatar */
.av {
  --s: 44px;
  position: relative;
  width: var(--s);
  height: var(--s);
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  font-stretch: 70%;
  font-size: calc(var(--s) * .38);
  letter-spacing: .02em;
  background: var(--c, var(--blue-700));
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(0, 0, 0, .12));
  box-shadow: 0 0 0 2px #fff, 0 4px 10px -4px rgba(6, 26, 61, .4);
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.ring-gold { box-shadow: 0 0 0 3px var(--gold-2), 0 0 0 6px rgba(255, 212, 0, .3), 0 10px 25px -8px rgba(224, 180, 0, .8); }
.av.ring-silver { box-shadow: 0 0 0 3px var(--silver-2), 0 0 0 6px rgba(169, 188, 208, .3); }
.av.ring-bronze { box-shadow: 0 0 0 3px var(--bronze-2), 0 0 0 6px rgba(192, 119, 58, .25); }
.av-stack { display: flex; align-items: center; }
.av-stack .av { --s: 26px; margin-left: -8px; font-size: 10px; }
.av-stack .av:first-child { margin-left: 0; }
.av-stack .more { margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); }

/* form */
.field { display: grid; gap: 6px; }
.field > span:not(.hint) { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
textarea.input { height: auto; min-height: 88px; padding: 12px 15px; resize: vertical; }
select.input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237285A0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 15px center; padding-right: 38px; }
.input:focus { border-color: var(--sky-500); box-shadow: 0 0 0 4px rgba(25, 163, 240, .15); }
.input.sm { height: 40px; border-radius: 11px; font-size: 15px; padding: 0 12px; }
.input-icon { position: relative; }
.input-icon .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-icon .input { padding-left: 42px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.err { color: var(--no); font-size: 13px; font-weight: 600; min-height: 1em; }
input[type='color'].input { padding: 5px; width: 56px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.switch:last-child { border-bottom: 0; }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 14px; background: var(--sky-50); border: 1px solid var(--sky-100); }
.seg button { height: 34px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--ink-3); transition: .2s var(--ease); white-space: nowrap; }
.seg button[aria-pressed='true'] { background: #fff; color: var(--blue-700); box-shadow: var(--sh-1); }

.empty { text-align: center; padding: 28px 12px; color: var(--ink-3); }
.empty .i { --is: 40px; color: var(--sky-300); margin: 0 auto 10px; display: block; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

.divider { height: 1px; background: var(--line-2); margin: 16px 0; border: 0; }

/* ==========================================================================
   PARTITA — HERO
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  border-radius: var(--r-xl);
  padding: 22px 20px 20px;
  background: radial-gradient(500px 260px at 100% 0%, rgba(127, 208, 255, .5), transparent 70%), var(--grad-hero);
  box-shadow: var(--sh-2);
}
.hero::before { content: ''; position: absolute; inset: 0; background: var(--stripes); z-index: -1; }
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -60px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, .025);
}
.hero-slash { position: absolute; z-index: -1; top: -20px; right: 16px; width: 30px; height: 115%; background: var(--grad-y); transform: skewX(-24deg); transform-origin: top; opacity: .95; -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 22%, transparent 46%); mask-image: linear-gradient(180deg, #000 0%, #000 22%, transparent 46%); }
.hero-slash.b { right: 60px; width: 8px; background: rgba(255, 255, 255, .3); }
@media (min-width: 700px) { .hero-slash { right: 70px; width: 40px; } .hero-slash.b { right: 128px; } }
.hero-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  background: var(--yellow);
  color: var(--navy-900);
  font-weight: 800;
  font-stretch: 70%;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.hero-main { display: flex; align-items: flex-end; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.hero-date { display: flex; align-items: flex-end; gap: 12px; }
.hd-num { font-size: 104px; line-height: .78; font-weight: 900; text-shadow: 0 10px 30px rgba(3, 14, 36, .35); }
.hd-side { display: grid; gap: 6px; padding-bottom: 2px; }
.hd-day { font-size: 26px; line-height: .9; }
.hd-mon { font-size: 26px; line-height: .9; color: var(--sky-200); }
.hd-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 24px;
  padding: 3px 12px 3px 10px;
  background: var(--yellow);
  color: var(--navy-900);
  border-radius: 8px;
  transform: skewX(-8deg);
}
.hd-time > * { transform: skewX(8deg); }
.hero-tbd { font-size: 54px; line-height: .86; }
.hero-tbd small { display: block; font-size: 17px; font-style: normal; font-stretch: 90%; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--sky-200); margin-top: 10px; }
.hero-tbd small b { color: var(--yellow); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, .88); }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .i { --is: 17px; color: var(--yellow); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; max-width: 360px; }
.cd {
  text-align: center;
  padding: 9px 4px 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cd b { display: block; font-size: 30px; line-height: 1; }
.cd span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; font-weight: 600; }
.hero-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(3, 14, 36, .25); font-size: 13.5px; border-left: 3px solid var(--yellow); }

/* ---------- presenza (3 pulsanti) ---------- */
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rsvp-btn {
  --c: var(--ok);
  --c50: var(--ok-50);
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 118px;
  padding: 14px 6px 12px;
  border-radius: 20px;
  background: #fff;
  border: 2px solid var(--line);
  transition: transform .25s var(--spring), border-color .2s, background .25s, box-shadow .25s;
  text-align: center;
}
.rsvp-btn:hover { border-color: var(--c); }
.rsvp-btn:active { transform: scale(.96); }
.rsvp-btn .ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c50); color: var(--c); transition: .25s var(--ease); }
.rsvp-btn .ico .i { --is: 24px; stroke-width: 2.6; }
.rsvp-btn b { font-size: 19px; line-height: 1; }
.rsvp-btn small { font-size: 11.5px; color: var(--ink-3); line-height: 1.2; }
.rsvp-btn.maybe { --c: #E0A800; --c50: var(--maybe-50); }
.rsvp-btn.out { --c: var(--no); --c50: var(--no-50); }
.rsvp-btn[aria-pressed='true'] {
  border-color: transparent;
  background: linear-gradient(150deg, var(--c), color-mix(in srgb, var(--c) 70%, #000));
  color: #fff;
  box-shadow: 0 16px 30px -14px var(--c);
  transform: translateY(-2px);
}
.rsvp-btn.maybe[aria-pressed='true'] { background: var(--grad-y); color: var(--navy-900); }
.rsvp-btn[aria-pressed='true'] .ico { background: rgba(255, 255, 255, .25); color: inherit; }
.rsvp-btn[aria-pressed='true'] small { color: inherit; opacity: .85; }
.rsvp-btn[aria-pressed='true']::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23061A3D' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
  animation: pop .35s var(--spring);
}
.my-status { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--sky-50); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.my-status .i { color: var(--blue-700); margin-top: 1px; }
.my-status.y { background: var(--yellow-50); }
.my-status.y .i { color: #B38600; }

/* ---------- stato convocati ---------- */
.conv-head { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.conv-count { font-size: 64px; line-height: .8; color: var(--navy-900); }
.conv-count small { font-size: 30px; color: var(--ink-4); }
.conv-lbl { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); padding-bottom: 4px; }
.tribar {
  display: flex;
  height: 16px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--free);
  box-shadow: inset 0 1px 3px rgba(6, 26, 61, .12);
  gap: 3px;
}
.tribar > div { width: var(--w); transition: width 1s var(--ease); position: relative; }
.tribar.anim > div { animation: grow 1.1s var(--ease) both; }
@keyframes grow { from { width: 0; } }
.tb-ok { background: linear-gradient(90deg, #0BAA64, #27D489); }
.tb-maybe { background: linear-gradient(90deg, #F5B800, #FFD83A); }
.tb-free { flex: 1; background: repeating-linear-gradient(-45deg, #D5E0EC 0 6px, #E3EBF4 6px 12px); }
.tb-ok::after, .tb-maybe::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 60%); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; transform: skewX(-12deg); }
.legend b { font-weight: 800; }

.roster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 6px; margin-top: 18px; }
.slot { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; position: relative; }
.slot .av { --s: 50px; }
.slot .nm { font-size: 12.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .pos { position: absolute; top: -4px; left: calc(50% - 31px); font-size: 10px; font-weight: 800; background: var(--navy-900); color: #fff; border-radius: 6px; padding: 1px 5px; z-index: 1; }
.slot .gst { position: absolute; top: 34px; left: calc(50% + 11px); width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); color: var(--navy-900); display: grid; place-items: center; font-size: 10px; font-weight: 900; box-shadow: 0 0 0 2px #fff; z-index: 1; }
.slot.free .av { background: transparent; box-shadow: none; border: 2px dashed var(--free); color: var(--ink-4); }
.slot.free .av .i { --is: 20px; }
.slot.free .nm { color: var(--ink-4); font-weight: 500; }
.slot.me .av { box-shadow: 0 0 0 3px var(--yellow), 0 6px 14px -4px rgba(224, 180, 0, .7); }
.slot button { all: unset; cursor: pointer; display: contents; }

.plist { display: grid; gap: 2px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.prow:last-child { border-bottom: 0; }
.prow .av { --s: 38px; }
.prow .who { flex: 1; min-width: 0; }
.prow .who b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .who small { display: block; color: var(--ink-3); font-size: 12.5px; }
.prow .quote { font-style: italic; color: var(--ink-2); }
.sub-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.sub-h .n { background: var(--line-2); color: var(--ink-2); border-radius: 99px; padding: 1px 8px; letter-spacing: 0; }
.sub-h::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }

details.more-list > summary { list-style: none; cursor: pointer; }
details.more-list > summary::-webkit-details-marker { display: none; }
details.more-list > summary .i { transition: transform .25s var(--ease); --is: 16px; }
details.more-list[open] > summary .i { transform: rotate(180deg); }

/* ---------- sondaggio ---------- */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--no); text-transform: uppercase; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--no); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.poll { display: grid; gap: 10px; }
.poll-opt {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: #fff;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .2s, transform .2s var(--spring);
}
.poll-opt:not([disabled]):hover { border-color: var(--sky-300); }
.poll-opt:not([disabled]):active { transform: scale(.985); }
.poll-opt[disabled] { cursor: default; }
.poll-fill { position: absolute; z-index: -1; inset: 0 auto 0 0; width: var(--p); background: linear-gradient(90deg, var(--sky-100), var(--sky-50)); transition: width .9s var(--ease); }
.poll-opt.lead .poll-fill { background: linear-gradient(90deg, #BFE6FF, #E3F4FF); }
.poll-opt.anim .poll-fill { animation: grow 1s var(--ease) both; }
.poll-opt.mine { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 212, 0, .25); }
.poll-day { font-size: 23px; line-height: 1; display: flex; align-items: center; gap: 8px; }
.poll-time { color: var(--blue-700); }
.poll-pct { font-size: 34px; line-height: 1; grid-row: span 2; color: var(--navy-900); }
.poll-pct small { font-size: 18px; color: var(--ink-3); }
.poll-sub { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); min-height: 26px; }
.poll-mine { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--yellow); color: var(--navy-900); padding: 2px 7px; border-radius: 6px; font-style: normal; }
.poll-mine .i { --is: 12px; stroke-width: 3.5; }
.poll-lead { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-700); font-style: normal; font-stretch: 100%; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.poll-admin { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

/* ---------- squadre ---------- */
.teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.team { border-radius: 18px; overflow: hidden; background: var(--line-2); min-width: 0; }
.team-h { position: relative; padding: 12px 12px 10px; color: #fff; background: var(--tc); overflow: hidden; }
.team-h::after { content: ''; position: absolute; right: -12px; top: -10px; width: 26px; height: 80px; background: rgba(255, 255, 255, .18); transform: skewX(-24deg); }
.team-h b { display: block; font-size: 20px; line-height: 1; }
.team-h small { font-size: 11.5px; opacity: .85; }
.team ul { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.team li { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: #fff; font-size: 13.5px; font-weight: 600; min-width: 0; }
.team li .av { --s: 28px; font-size: 11px; }
.team li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs { align-self: center; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--yellow); color: var(--navy-900); font-size: 18px; transform: skewX(-10deg); box-shadow: var(--sh-y); }

/* ---------- mini widget ---------- */
.mini-list { display: grid; gap: 8px; }
.mini { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--sky-50); }
.mini .av { --s: 36px; }
.mini .grow { flex: 1; min-width: 0; }
.mini b { display: block; }
.mini .big { font-size: 28px; line-height: 1; color: var(--navy-900); }

.admin-strip {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: 16px;
  background: linear-gradient(135deg, var(--navy-900), #0B2F6B);
  color: #fff;
  box-shadow: var(--sh-2);
}
.admin-strip::before { content: ''; position: absolute; inset: 0; background: var(--stripes); pointer-events: none; }
.admin-strip .card-h h2, .admin-strip .card-h h3 { color: #fff; }
.admin-strip .grid-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; }
.admin-strip .act {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  text-align: left;
  transition: .2s var(--ease);
  line-height: 1.2;
}
.admin-strip .act:hover { background: rgba(255, 255, 255, .14); }
.admin-strip .act .i { color: var(--yellow); }
.admin-strip .act.hot { background: var(--grad-y); color: var(--navy-900); border-color: transparent; box-shadow: var(--sh-y); }
.admin-strip .act.hot .i { color: var(--navy-900); }

/* ==========================================================================
   CLASSIFICA
   ========================================================================== */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; max-width: 620px; margin: 6px auto 0; padding: 0 2px; }
.pod { display: grid; justify-items: center; text-align: center; color: #fff; min-width: 0; cursor: pointer; }
.pod .av { --s: 68px; margin-bottom: 10px; }
.pod.p1 .av { --s: 92px; }
.pod .medal { position: relative; margin: -26px 0 6px 44px; font-size: 22px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .3)); z-index: 2; }
.pod.p1 .medal { margin-left: 62px; font-size: 26px; }
.pod .pname { font-size: 19px; line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .pgoals { font-size: 44px; line-height: .9; margin: 6px 0 2px; color: var(--yellow); text-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.pod.p1 .pgoals { font-size: 58px; }
.pod .plbl { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; font-weight: 700; margin-bottom: 10px; }
.step {
  position: relative;
  width: 100%;
  height: var(--h);
  border-radius: 14px 14px 0 0;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  font-size: 44px;
  color: rgba(6, 26, 61, .55);
  background: linear-gradient(180deg, var(--s1), var(--s2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 -10px 30px -10px rgba(0, 0, 0, .3);
  overflow: hidden;
  transform-origin: bottom;
  animation: rise .9s var(--ease) both;
  animation-delay: var(--d, 0s);
}
.step::after { content: ''; position: absolute; top: 0; left: -40%; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: shine 3.5s 1.2s infinite; }
@keyframes shine { 0%, 60% { left: -40%; } 100% { left: 130%; } }
@keyframes rise { from { transform: scaleY(0); } }
.p1 .step { --h: 118px; --s1: var(--gold-1); --s2: var(--gold-2); }
.p2 .step { --h: 88px; --s1: var(--silver-1); --s2: var(--silver-2); }
.p3 .step { --h: 66px; --s1: var(--bronze-1); --s2: var(--bronze-2); }
.podium-base { height: 10px; max-width: 640px; margin: 0 auto; border-radius: 0 0 12px 12px; background: rgba(3, 14, 36, .35); }

.toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 760px) { .toolbar { grid-template-columns: 1fr auto; align-items: center; } }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-wrap { margin: 0 -18px; }
.table th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table th:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table th.l, .table td.l { text-align: left; }
.table td { padding: 10px 10px; text-align: right; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.table td:first-child { padding-left: 18px; }
.table tbody tr { cursor: pointer; transition: background .15s; }
.table tbody tr:hover { background: var(--sky-50); }
.table tbody tr:last-child td { border-bottom: 0; }
.rk { width: 36px; font-size: 22px; color: var(--ink-4); text-align: center !important; }
.rk.r1 { color: var(--gold-2); }
.rk.r2 { color: var(--silver-2); }
.rk.r3 { color: var(--bronze-2); }
.pl { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pl .av { --s: 38px; }
.pl .nmw { min-width: 0; }
.pl b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 44vw; }
.gcell { font-size: 26px; color: var(--navy-900); position: relative; }
.gbar { display: block; height: 4px; border-radius: 3px; background: var(--line-2); margin-top: 4px; overflow: hidden; min-width: 44px; }
.gbar i { display: block; height: 100%; width: var(--w); background: var(--grad-sky); border-radius: 3px; }
tr.top .gbar i { background: var(--grad-y); }
.avg { font-weight: 700; color: var(--ink-2); }
.form { display: inline-flex; gap: 3px; margin-top: 3px; }
.form i { width: 14px; height: 14px; border-radius: 4px; font-size: 9px; font-style: normal; font-weight: 800; display: grid; place-items: center; color: #fff; }
.form .W { background: var(--ok); }
.form .D { background: var(--ink-4); }
.form .L { background: var(--no); }
.hide-s { display: none; }
@media (min-width: 640px) { .hide-s { display: table-cell; } .pl b { max-width: none; } }

/* ==========================================================================
   ALBO D'ORO
   ========================================================================== */
.albo-hero { display: flex; align-items: center; gap: 18px; color: #fff; padding: 10px 2px 24px; }
.trophy { width: 104px; height: 104px; flex: none; filter: drop-shadow(0 16px 30px rgba(224, 180, 0, .55)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-2deg); } }
.statbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 900px) { .statbox-grid { grid-template-columns: repeat(4, 1fr); } }
.statbox { position: relative; overflow: hidden; padding: 16px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-1); border: 1px solid rgba(10, 63, 143, .06); }
.statbox .lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.statbox .lbl .i { --is: 15px; color: var(--sky-500); }
.statbox .val { font-size: 50px; line-height: .9; margin: 10px 0 6px; color: var(--navy-900); }
.statbox .who { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.statbox.gold { background: linear-gradient(145deg, #FFF3B0, #FFD400 55%, #F0B800); border: 0; box-shadow: var(--sh-y); }
.statbox.gold .lbl, .statbox.gold .who { color: rgba(6, 26, 61, .75); }
.statbox.gold .lbl .i { color: var(--navy-900); }
.statbox.gold::after { content: ''; position: absolute; right: -20px; top: -20px; width: 40px; height: 160%; background: rgba(255, 255, 255, .35); transform: skewX(-24deg); }
.statbox.navy { background: linear-gradient(145deg, var(--navy-900), var(--blue-800)); color: #fff; border: 0; }
.statbox.navy .val { color: var(--yellow); }
.statbox.navy .lbl, .statbox.navy .who { color: rgba(255, 255, 255, .78); }
.statbox.navy .lbl .i { color: var(--yellow); }

.hof { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.hof-card { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, var(--sky-50), #fff); border: 1px solid var(--sky-100); overflow: hidden; }
.hof-card .times { color: var(--blue-700); min-width: 64px; text-align: center; display: grid; justify-items: center; }
.hof-card .times .num { font-size: 62px; line-height: .8; }
.hof-card .times small { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; color: var(--ink-3); }
.hof-card .tag { margin-bottom: 4px; }
.hof-card.first { background: linear-gradient(135deg, #FFF8D6, #fff 70%); border-color: #FFE88A; }
.hof-card.first .times { color: var(--yellow-600); }
.hof-card b { font-size: 18px; display: block; line-height: 1.15; }
.hof-card .years { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

.tl { position: relative; display: grid; gap: 14px; padding-left: 26px; }
.tl::before { content: ''; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--yellow), var(--sky-400) 40%, var(--sky-200)); }
.tl-item { position: relative; }
.tl-item::before { content: ''; position: absolute; left: -24px; top: 22px; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--sky-500); box-shadow: 0 0 0 4px var(--bg); }
.tl-item.rec::before { border-color: var(--yellow-600); background: var(--yellow); }
.tl-item.na::before { border-color: var(--ink-4); }
.tl-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: var(--sh-1); border: 1px solid rgba(10, 63, 143, .06); position: relative; overflow: hidden; }
.tl-year { font-size: 38px; line-height: .85; color: var(--blue-700); }
.tl-name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.tl-name small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.tl-bar { height: 5px; border-radius: 3px; background: var(--line-2); margin-top: 8px; overflow: hidden; }
.tl-bar i { display: block; height: 100%; width: var(--w); background: var(--grad-sky); border-radius: 3px; animation: grow 1.2s var(--ease) both; }
.tl-goals { text-align: right; }
.tl-goals .num { font-size: 34px; line-height: .9; color: var(--navy-900); display: block; }
.tl-goals small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.tl-item.rec .tl-card { background: linear-gradient(120deg, #FFF6C2, #FFFDF2 60%); border-color: #FFE27A; box-shadow: var(--sh-y); }
.tl-item.rec .tl-year { color: var(--yellow-600); }
.tl-item.rec .tl-bar i { background: var(--grad-y); }
.ribbon { position: absolute; top: 0; right: 0; padding: 4px 12px 4px 18px; background: var(--navy-900); color: var(--yellow); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%); }
.tl-item.na .tl-card { background: repeating-linear-gradient(-45deg, #F6F9FC 0 10px, #fff 10px 20px); box-shadow: none; border: 1.5px dashed var(--line); }
.tl-item.na .tl-year { color: var(--ink-4); }
.tl-item.na .tl-name { color: var(--ink-3); }

/* ==========================================================================
   RISULTATI
   ========================================================================== */
.results { display: grid; gap: 16px; }
@media (min-width: 900px) { .results { grid-template-columns: 1fr 1fr; } }
.score-card { position: relative; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; border: 1px solid rgba(10, 63, 143, .06); }
.score-card.featured { grid-column: 1 / -1; }
.sc-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.sc-top .i { --is: 15px; }
.sc-top .sp { flex: 1; }
.sc-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 18px 14px 10px; }
.sc-team { display: grid; justify-items: center; gap: 8px; text-align: center; min-width: 0; }
.crest { width: 52px; height: 58px; display: grid; place-items: center; color: #fff; background: var(--tc); clip-path: path('M4 0h44a4 4 0 0 1 4 4v28c0 13-11 22-26 26C11 54 0 45 0 32V4a4 4 0 0 1 4-4z'); position: relative; }
.crest::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 45%, rgba(255, 255, 255, .22) 45% 58%, transparent 58%); }
.crest .i { --is: 24px; }
.sc-team b { font-size: 17px; line-height: 1.05; max-width: 100%; }
.sc-team.lose b { color: var(--ink-3); }
.sc-score { display: flex; align-items: center; gap: 6px; font-size: 64px; line-height: .9; color: var(--navy-900); }
.sc-score .sep { font-size: 36px; color: var(--ink-4); }
.sc-score .lose { color: var(--ink-4); }
.featured .sc-score { font-size: 84px; }
.sc-res { text-align: center; margin: 2px 0 6px; }
.scorers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 16px 16px; }
.scorers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.scorers li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.scorers li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorers li .balls { color: var(--blue-700); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.scorers li .i { --is: 15px; color: var(--ink-3); }
.scorers ul.right li { flex-direction: row-reverse; text-align: right; }
.sc-foot { display: flex; gap: 8px; padding: 0 16px 14px; flex-wrap: wrap; }
.sc-lineups { padding: 0 16px 16px; }

/* ==========================================================================
   PROFILO GIOCATORE
   ========================================================================== */
.pcard {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  border-radius: var(--r-xl);
  padding: 24px 20px 20px;
  background: radial-gradient(400px 240px at 90% 0%, rgba(255, 212, 0, .35), transparent 70%), var(--grad-hero);
  box-shadow: var(--sh-2);
}
.pcard::before { content: ''; position: absolute; inset: 0; background: var(--stripes); z-index: -1; }
.pcard .big-num { position: absolute; right: 14px; top: -14px; font-size: 180px; line-height: 1; color: rgba(255, 255, 255, .08); z-index: -1; }
.pcard-top { display: flex; gap: 16px; align-items: center; }
.pcard-top .av { --s: 96px; box-shadow: 0 0 0 4px var(--yellow), 0 20px 40px -12px rgba(0, 0, 0, .5); }
.pcard h2 { margin: 0; font-size: 44px; }
.pcard .sub { opacity: .85; font-size: 14px; margin-top: 4px; }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.pstat { padding: 10px 6px; text-align: center; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); }
.pstat b { display: block; font-size: 32px; line-height: 1; }
.pstat span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .78; font-weight: 700; }
.pstat.hl b { color: var(--yellow); }

/* ==========================================================================
   ADMIN
   ========================================================================== */
.tabs-s { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding: 2px 16px; }
.tabs-s::-webkit-scrollbar { display: none; }
.tabs-s a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-weight: 700;
  font-stretch: 80%;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid rgba(255, 255, 255, .18);
}
.tabs-s a .i { --is: 17px; }
.tabs-s a[aria-current='page'] { background: #fff; color: var(--blue-700); border-color: #fff; box-shadow: var(--sh-1); }
.tabs-s a[aria-current='page'] .i { color: var(--yellow-600); }

.opt-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--sky-50); }
.opt-row .grow { flex: 1; font-weight: 600; }

.tb-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; padding: 10px; border-radius: 16px; background: var(--sky-50); border: 2px dashed var(--sky-200); }
.tb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tb-col { border-radius: 16px; padding: 10px; background: color-mix(in srgb, var(--tc) 9%, #fff); border: 2px solid color-mix(in srgb, var(--tc) 35%, #fff); min-height: 150px; }
.tb-col h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 18px; }
.tb-col h4 .sw { width: 14px; height: 14px; border-radius: 4px; background: var(--tc); transform: skewX(-12deg); }
.tb-col .list { display: grid; gap: 6px; }
.pchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 99px;
  background: #fff;
  border: 1.5px solid var(--line);
  font-weight: 600;
  font-size: 13.5px;
  max-width: 100%;
  transition: transform .2s var(--spring), box-shadow .2s;
  user-select: none;
}
.pchip .av { --s: 28px; font-size: 11px; box-shadow: none; }
.pchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip small { color: var(--ink-3); font-weight: 600; margin-left: auto; padding-left: 4px; }
.pchip:hover { box-shadow: var(--sh-1); }
.pchip.sel { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 212, 0, .35); transform: translateY(-1px); }
.tb-col .pchip { width: 100%; }
.balance { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.balance .meter { flex: 1; height: 8px; border-radius: 5px; overflow: hidden; display: flex; background: var(--line-2); }
.balance .meter i { height: 100%; }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--sky-50); border-radius: 12px; padding: 3px; }
.stepper button { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #fff; box-shadow: var(--sh-1); color: var(--blue-700); }
.stepper button .i { --is: 16px; stroke-width: 2.6; }
.stepper b { min-width: 28px; text-align: center; font-size: 22px; }
.score-input { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.score-input .team-in { display: grid; gap: 6px; justify-items: center; text-align: center; }
.score-input .team-in b { font-size: 16px; }
.score-input .stepper b { font-size: 40px; min-width: 52px; }
.score-input .stepper button { width: 40px; height: 40px; }

.urow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.urow:last-child { border-bottom: 0; }
.urow .av { --s: 46px; }
.urow .who b { display: block; }
.urow .who small { color: var(--ink-3); font-size: 12.5px; display: block; }
.urow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.av-edit { position: relative; cursor: pointer; }
.av-edit::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23061A3D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") center / 12px no-repeat; box-shadow: 0 0 0 2px #fff; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.swatches button[aria-pressed='true'] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy-900); }
.av-preview { display: flex; justify-content: center; padding: 8px 0 16px; }
.av-preview .av { --s: 120px; }

/* ==========================================================================
   OVERLAY: sheet, drawer, toast
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 14, 36, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade .25s var(--ease);
}
.overlay.closing { animation: fade .2s var(--ease) reverse both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: relative;
  width: 100%;
  max-height: 92dvh;
  overflow: auto;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px -20px rgba(3, 14, 36, .5);
  animation: up .38s var(--ease);
}
.overlay.closing .sheet { animation: up .22s var(--ease) reverse both; }
@keyframes up { from { transform: translateY(100%); } }
.sheet .handle { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 28px; }
.sheet .lead { color: var(--ink-3); margin: 0 0 16px; font-size: 14px; }
.sheet .close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--line-2); color: var(--ink-2); }
.sheet-actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 520px; border-radius: 28px; padding: 26px 26px 24px; }
  .sheet.wide { max-width: 760px; }
  .sheet .handle { display: none; }
  @keyframes up { from { transform: translateY(30px) scale(.97); opacity: 0; } }
}
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick button { height: 32px; padding: 0 12px; border-radius: 99px; background: var(--sky-50); border: 1px solid var(--sky-100); color: var(--blue-700); font-size: 13px; font-weight: 600; }
.quick button:hover { background: var(--sky-100); }

.drawer-ov { justify-content: flex-end; align-items: stretch; padding: 0; }
.drawer {
  width: min(420px, 100%);
  height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: slide .35s var(--ease);
  box-shadow: -30px 0 60px -20px rgba(3, 14, 36, .5);
}
.overlay.closing .drawer { animation: slide .2s var(--ease) reverse both; }
@keyframes slide { from { transform: translateX(100%); } }
.drawer-h { position: relative; overflow: hidden; padding: calc(env(safe-area-inset-top) + 18px) 18px 18px; background: var(--grad-hero); color: #fff; display: flex; align-items: center; gap: 10px; }
.drawer-h::before { content: ''; position: absolute; inset: 0; background: var(--stripes); }
.drawer-h h3 { margin: 0; font-size: 30px; position: relative; flex: 1; }
.drawer-h .icon-btn { position: relative; }
.drawer-body { flex: 1; overflow: auto; padding: 12px; display: grid; gap: 8px; align-content: start; }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: var(--sh-1); position: relative; text-align: left; width: 100%; }
.notif .ico { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--sky-50); color: var(--blue-700); }
.notif .ico.y { background: var(--yellow-50); color: #B38600; }
.notif .ico.ok { background: var(--ok-50); color: var(--ok-2); }
.notif .ico.no { background: var(--no-50); color: var(--no); }
.notif b { display: block; font-size: 14.5px; line-height: 1.25; }
.notif p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.notif time { font-size: 11.5px; color: var(--ink-3); display: block; margin-top: 4px; }
.notif.unread::after { content: ''; position: absolute; top: 14px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--sky-500); box-shadow: 0 0 0 3px var(--sky-100); }
.push-cta { margin: 12px 12px 0; padding: 14px; border-radius: 16px; background: var(--navy-900); color: #fff; display: flex; gap: 12px; align-items: center; }
.push-cta .i { color: var(--yellow); --is: 26px; }
.push-cta p { margin: 0; font-size: 13px; opacity: .85; }

.toasts { position: fixed; z-index: 100; top: calc(env(safe-area-inset-top) + 12px); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  background: rgba(6, 26, 61, .95);
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -12px rgba(3, 14, 36, .55);
  animation: toast-in .45s var(--spring);
  font-size: 14px;
  cursor: pointer;
}
.toast.out { animation: toast-in .25s var(--ease) reverse both; }
@keyframes toast-in { from { transform: translateY(-20px) scale(.95); opacity: 0; } }
.toast .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); flex: none; color: var(--yellow); }
.toast.ok .ico { background: var(--ok); color: #fff; }
.toast.err .ico { background: var(--no); color: #fff; }
.toast b { display: block; }
.toast small { opacity: .8; display: block; }

@keyframes pop { from { transform: scale(0); } }

/* confetti */
.confetti { position: fixed; z-index: 90; pointer-events: none; inset: 0; overflow: hidden; }
.confetti i {
  position: absolute;
  width: 9px;
  height: 14px;
  left: var(--x);
  top: var(--y);
  background: var(--c);
  border-radius: 2px;
  animation: confetti 1.3s var(--ease) forwards;
}
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}

/* reveal all'ingresso della pagina */
.reveal > * { animation: rise-in .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } }

.skeleton { background: linear-gradient(90deg, var(--line-2), #fff, var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

.install-tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--sky-50); font-size: 13.5px; }
.install-tip .i { color: var(--blue-700); margin-top: 2px; }

.foot { text-align: center; color: var(--ink-4); font-size: 12px; margin: 30px 0 10px; }

@media (max-width: 420px) {
  .pod .plbl { letter-spacing: .06em; font-size: 10px; }
}
@media (max-width: 380px) {
  .hd-num { font-size: 88px; }
  .rsvp-btn { min-height: 108px; }
  .rsvp-btn b { font-size: 17px; }
  .sc-score { font-size: 52px; }
  .podium .av { --s: 58px; }
  .pod.p1 .av { --s: 78px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   CLASSIFICA v2 — campionato + marcatori, tabella a colonne fisse
   ========================================================================== */
.mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(3, 14, 36, .28);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  color: rgba(255, 255, 255, .8);
  font-weight: 700;
  font-stretch: 80%;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: .2s var(--ease);
}
.mode-switch button .i { --is: 17px; }
.mode-switch button[aria-selected='true'] { background: var(--yellow); color: var(--navy-900); box-shadow: var(--sh-y); }

.table.fixed { table-layout: fixed; }
.table.fixed td, .table.fixed th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 4px; padding-right: 4px; }
.table.fixed td.l, .table.fixed th.l { padding-left: 8px; }
.table.fixed td:first-child, .table.fixed th:first-child { padding-left: 10px; padding-right: 0; }
.table.fixed td:last-child, .table.fixed th:last-child { padding-right: 14px; }
.table.fixed .c-rk { width: 40px; }
.table.fixed .c-n { width: 30px; }
.table.fixed .c-dr { width: 38px; }
.table.fixed .c-pt { width: 48px; }
.table.fixed .c-avg { width: 52px; }
.table.fixed .c-gol { width: 64px; }
.table.fixed th { font-size: 10.5px; letter-spacing: .06em; text-align: center; }
.table.fixed td { text-align: center; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.table.fixed td.l, .table.fixed th.l { text-align: left; }
.table.fixed .rk { font-size: 20px; }
.table.fixed .pl { gap: 9px; }
.table.fixed .pl .av { --s: 34px; }
.table.fixed .pl .nmw { min-width: 0; flex: 1; }
.table.fixed .pl b { max-width: 100%; font-size: 14.5px; color: var(--ink); }
.pl-meta { display: flex; align-items: center; gap: 4px; margin-top: 2px; overflow: hidden; }
.pl-meta:empty { display: none; }
.pl-meta .form { margin-top: 0; }
.table.fixed td.pts { font-size: 24px; color: var(--navy-900); font-weight: 800; }
.table.fixed tr.top td.pts { color: var(--blue-700); }
.table.fixed .gcell { font-size: 22px; }
.table.fixed .gbar { min-width: 0; }
.table.fixed td:last-child .gbar { margin-left: auto; width: 100%; }
@media (max-width: 420px) {
  .table.fixed .c-dr, .table .hide-xs { display: none; }
  .table.fixed .c-n { width: 26px; }
  .table.fixed .c-pt { width: 42px; }
  .table.fixed .pl .av { --s: 30px; font-size: 11px; }
  .mode-switch button { padding: 0 12px; font-size: 14px; }
}
@media (min-width: 640px) {
  .table.fixed .c-n { width: 44px; }
  .table.fixed .c-dr { width: 52px; }
  .table.fixed .c-pt { width: 60px; }
  .table.fixed .c-avg { width: 72px; }
  .table.fixed .c-gol { width: 110px; }
}
.val-u { font-size: .42em; font-style: normal; margin-left: 4px; opacity: .7; }

/* numeri del podio e delle card che non escono mai dai riquadri */
.pod { overflow: visible; }
.pod .pname, .pod .plbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .pgoals { font-size: clamp(30px, 10vw, 44px); }
.pod.p1 .pgoals { font-size: clamp(38px, 13vw, 58px); }
.statbox { min-width: 0; }
.statbox .val { font-size: clamp(34px, 11vw, 50px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statbox .who { overflow-wrap: anywhere; }
.pstat { min-width: 0; }
.pstat b { font-size: clamp(20px, 7vw, 32px); white-space: nowrap; }
.pstats { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
.sc-score { font-size: clamp(44px, 15vw, 64px); }
.featured .sc-score { font-size: clamp(52px, 17vw, 84px); }
.slot .nm { width: 100%; }
.scorers li.og { color: var(--ink-3); font-style: italic; }
.team li .tag { margin-left: auto; flex: none; }

/* associazione account → giocatore */
.assoc-card { border: 2px solid #FFE88A; background: linear-gradient(180deg, #FFFCEB, #fff 40%); }
.assoc { display: grid; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.assoc:last-child { border-bottom: 0; padding-bottom: 0; }
.assoc-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.assoc-who .av { --s: 40px; }
.assoc-who b { display: block; }
.assoc-who small { color: var(--ink-3); font-size: 12.5px; }
.assoc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.assoc-row select { flex: 1 1 220px; min-width: 0; }
.assoc-row input { flex: 1 1 160px; min-width: 0; }

/* righe referto e costruttore squadre */
.pchip.rs-row { width: 100%; gap: 6px; }
.pchip.rs-row > span:not(.stepper):not(.av) { flex: 1; min-width: 0; }
.pchip.og-row { background: var(--line-2); border-style: dashed; color: var(--ink-3); font-style: italic; }
.pchip.og-row .av { box-shadow: none; }
.pchip .btn.xs { flex: none; }
.pchip > span:not(.stepper):not(.av) { min-width: 0; }
.tb-col .pchip > span:not(.stepper):not(.av) { flex: 1; }
@media (max-width: 640px) {
  .tb-cols { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .appbar .live-dot { display: none; }
}
.score-input > * { min-width: 0; }
@media (max-width: 480px) {
  .score-input { gap: 6px; }
  .score-input .stepper { gap: 2px; padding: 2px; }
  .score-input .stepper button { width: 32px; height: 32px; }
  .score-input .stepper b { font-size: 30px; min-width: 36px; }
  .score-input .vs { width: 32px; height: 32px; font-size: 15px; }
  .pchip.rs-row .stepper button { width: 28px; height: 28px; }
  .pchip.rs-row .stepper b { min-width: 22px; font-size: 18px; }
}

/* ==========================================================================
   STATO CONVOCATI v2 — contatori, obiettivo, barra, schede, chip scorrevoli
   ========================================================================== */
.conv-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px 0 11px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1.5px solid;
}
.pill .i { --is: 16px; stroke-width: 2.8; }
.pill b { font-weight: 900; }
.pill.ok { color: #0A8F55; background: var(--ok-50); border-color: #9FE3C2; }
.pill.ok .i { background: var(--ok); color: #fff; border-radius: 50%; padding: 2px; }
.pill.y { color: #8A6400; background: var(--maybe-50); border-color: #FFDF7A; }
.pill.y .i { background: var(--maybe); color: var(--navy-900); border-radius: 50%; padding: 2px; }
.pill.free { color: var(--ink-3); background: var(--line-2); border-color: var(--line); }
.pill.full { color: var(--navy-900); background: var(--yellow); border-color: var(--yellow-600); }
.conv-goal { margin: 12px 0 10px; font-size: 13.5px; color: var(--ink-3); }
.conv-goal b { color: var(--ink); }
.tribar.conv-bar { height: 14px; gap: 2px; }
.conv-bar .tb-ok { background: linear-gradient(90deg, #0E9F62, #3ED68E); }
.conv-bar .tb-maybe { background: linear-gradient(90deg, #F2A900, #FFD84A); }
.conv-tabs { display: flex; gap: 18px; margin: 18px 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.conv-tabs::-webkit-scrollbar { display: none; }
.conv-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 0 2px 10px;
  margin-bottom: -1px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-3);
  border-bottom: 3px solid transparent;
  transition: .2s var(--ease);
}
.conv-tabs button .i { --is: 16px; }
.conv-tabs button[aria-selected='true'] { color: #0A8F55; border-bottom-color: var(--ok); }
.conv-tabs button[data-k='maybe'][aria-selected='true'] { color: #8A6400; border-bottom-color: var(--maybe); }
.conv-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin: 0 -2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--sky-200) transparent;
}
.conv-scroll::-webkit-scrollbar { height: 5px; }
.conv-scroll::-webkit-scrollbar-thumb { background: var(--sky-200); border-radius: 3px; }
.cchip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 230px;
  padding: 7px 12px 7px 7px;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 8px -4px rgba(6, 26, 61, .2);
  scroll-snap-align: start;
  text-align: left;
  transition: transform .2s var(--spring), border-color .2s;
}
.cchip:hover { border-color: var(--sky-300); transform: translateY(-1px); }
.cchip .av { --s: 36px; font-size: 13px; }
.cchip-txt { display: grid; min-width: 0; }
.cchip-txt b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cchip-txt small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.cchip-txt small.dl { display: inline-flex; align-items: center; gap: 3px; color: #8A6400; font-weight: 700; }
.cchip-txt small.dl .i { --is: 11px; }
.cchip-txt small.dl.late { color: var(--no); }
.cchip-ico { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--ok); }
.cchip-ico .i { --is: 13px; stroke-width: 3.2; }
.cchip.maybe .cchip-ico { background: var(--maybe); color: var(--navy-900); }
.cchip.me { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 212, 0, .25); }
.cchip.add { border-style: dashed; border-color: var(--sky-300); background: var(--sky-50); color: var(--blue-700); padding-left: 12px; }
.cchip.add > .i { --is: 22px; }
.cchip.add small { color: var(--blue-700); opacity: .8; }
.cchip.empty { box-shadow: none; border-style: dashed; color: var(--ink-3); padding: 14px 16px; font-size: 13.5px; }
.conv-rule { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.conv-rule .i { --is: 14px; color: var(--sky-500); flex: none; }

/* le colonne non si allargano mai per contenuti scorrevoli (chip, tabelle) */
.grid { grid-template-columns: minmax(0, 1fr); }
.grid > *, .col > *, .card { min-width: 0; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
  .grid-2e { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* convocati per giorno + scelta multipla dei giorni */
.day-tabs { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tabs button {
  flex: 1 0 auto;
  min-width: 118px;
  display: grid;
  gap: 3px;
  justify-items: start;
  padding: 10px 14px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fff;
  text-align: left;
  transition: .2s var(--ease);
}
.day-tabs button span { font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.day-tabs button b { font-size: 28px; line-height: 1; color: var(--navy-900); }
.day-tabs button b small { font-size: 15px; color: var(--ink-4); }
.day-tabs button em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-700); }
.day-tabs button[aria-selected='true'] { border-color: var(--ok); background: var(--ok-50); box-shadow: 0 6px 16px -10px var(--ok); }
.day-opt .day-check { width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid var(--line); display: inline-grid; place-items: center; margin-right: 4px; color: transparent; background: #fff; transition: .15s; }
.day-opt .day-check .i { --is: 14px; stroke-width: 3.4; }
.day-opt.mine { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 111, .18); }
.day-opt.mine .day-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.poll-sub b { color: var(--ink-2); font-weight: 800; }
.poll-foot .btn { flex: none; }

/* highlights sotto il risultato */
.sc-hl { position: relative; margin: 2px 16px 14px; padding: 12px 14px 12px 16px; border-radius: 14px; background: linear-gradient(135deg, var(--yellow-50), #fff 80%); border: 1px solid #FFE88A; overflow: hidden; }
.sc-hl::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-y); }
.sc-hl-t { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8A6400; }
.sc-hl-t .i { --is: 14px; }
.sc-hl p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.hl-field > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.hl-field > span:first-child .i { --is: 15px; color: var(--yellow-600); }
.hl-field { margin: 14px 0 10px; }
.poll-opt > * { min-width: 0; }
.poll-sub { flex-wrap: wrap; row-gap: 2px; min-height: 0; }
.poll-voters { grid-column: 1 / -1; margin-top: 4px; }

/* intervista post-partita */
.sc-int { position: relative; margin: 0 16px 16px; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, var(--navy-900), #0B3274); color: #fff; box-shadow: var(--sh-1); }
.sc-int::before { content: ''; position: absolute; inset: 0; background: var(--stripes); pointer-events: none; }
.sc-int-h { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sc-int-h .mic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--navy-900); }
.sc-int-h .mic .i { --is: 16px; stroke-width: 2.4; }
.sc-int-h b { font-size: 18px; flex: 1; }
.sc-int-h .onair { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #FF8A99; }
.sc-int-h .onair::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #FF4D61; box-shadow: 0 0 0 3px rgba(255, 77, 97, .25); }
.sc-int-who { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px 4px; }
.sc-int-who .av { --s: 40px; box-shadow: 0 0 0 2px var(--yellow); }
.sc-int-who b { display: block; font-size: 15px; }
.sc-int-who small { font-size: 11.5px; opacity: .7; }
.sc-int-body { position: relative; padding: 6px 14px 14px; }
.sc-int-body p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.sc-int-body p.q { color: var(--sky-200); font-weight: 700; font-size: 13.5px; }
.sc-int-body p.q::before { content: 'D. '; color: var(--yellow); }
.sc-int-body p.a.quote { position: relative; padding-left: 26px; font-style: italic; font-size: 15.5px; }
.sc-int-body p.a.quote::before { content: '“'; position: absolute; left: 0; top: -12px; font-size: 44px; line-height: 1; color: var(--yellow); font-style: normal; font-weight: 900; }
.int-fields { margin: 14px 0 6px; padding: 14px; border-radius: 16px; background: var(--sky-50); border: 1px solid var(--sky-100); }
.int-fields-h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.int-fields-h .i { --is: 18px; color: var(--blue-700); }

/* barra di navigazione a 6 voci */
.tab .cnt { position: absolute; top: 3px; left: calc(50% + 4px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--no); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; font-stretch: 100%; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; letter-spacing: 0; }
@media (max-width: 480px) {
  .tabbar { left: 6px; right: 6px; padding: 0 2px; }
  .tab { font-size: 9.5px; letter-spacing: .01em; }
  .tab .i { --is: 21px; }
}
.card-h { flex-wrap: wrap; row-gap: 8px; }

/* l'attributo hidden vince sempre sugli stili dei componenti */
[hidden] { display: none !important; }

/* editor foto avatar */
.crop-stage {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 4px auto 14px;
  border-radius: 20px;
  overflow: hidden;
  background: repeating-conic-gradient(#E8EEF5 0% 25%, #F6F9FC 0% 50%) 50% / 20px 20px;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.crop-stage:active { cursor: grabbing; }
.crop-img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: center; pointer-events: none; will-change: transform; }
.crop-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(3, 14, 36, .55); border: 2px solid rgba(255, 255, 255, .9); pointer-events: none; }
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255, 255, 255, .35) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255, 255, 255, .35) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(0deg, transparent calc(33.33% - .5px), rgba(255, 255, 255, .35) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255, 255, 255, .35) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
.crop-controls { display: flex; align-items: center; gap: 10px; max-width: 340px; margin: 0 auto 10px; }
.crop-controls .btn { --bh: 36px; width: 36px; padding: 0; flex: none; }
.crop-zoom { flex: 1; accent-color: var(--blue-700); height: 28px; }
.crop-tools { justify-content: center; }
.crop-tools [data-rot="-90"] .i { transform: scaleX(-1); }

/* ==========================================================================
   CHAT — schermata a sé stante
   ========================================================================== */
/* pagina sotto bloccata: su iPhone niente scorrimenti residui quando si apre/chiude la tastiera */
html.chat-open { height: 100%; overflow: hidden; overscroll-behavior: none; scroll-behavior: auto; }
html.chat-open body { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
html.chat-open .appbar,
html.chat-open .tabbar,
html.chat-open .band { display: none; }
html.chat-open .view { z-index: auto; }
.reveal > .chat-screen { animation: none; }
.chat-screen {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  /* altezza e spostamento dell'area visibile (tastiera compresa), aggiornati dallo script */
  height: var(--vvh, 100dvh);
  transform: translate3d(0, var(--vvt, 0px), 0);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(127, 208, 255, .25), transparent 60%),
    var(--bg);
}
@media (min-width: 1080px) {
  .chat-screen { left: var(--side-w); }
}
.cs-head {
  flex: none;
  position: relative;
  touch-action: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 12px;
  color: #fff;
  background: var(--grad-hero);
  box-shadow: 0 8px 24px -14px rgba(3, 14, 36, .6);
  overflow: hidden;
}
.cs-head::before { content: ''; position: absolute; inset: 0; background: var(--stripes); pointer-events: none; }
.cs-back { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #fff; }
.cs-back .i { --is: 22px; stroke-width: 2.6; }
.cs-title { position: relative; flex: 1; min-width: 0; display: grid; }
.cs-title b { font-size: 22px; line-height: 1.05; }
.cs-title small { font-size: 12px; opacity: .85; display: inline-flex; align-items: center; gap: 6px; }
.cs-title small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3BF08F; }
.cs-logo { position: relative; width: 36px; height: 36px; flex: none; }
@media (min-width: 1080px) { .cs-back { display: none; } }
.cs-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
}
.cs-list > :first-child { margin-top: auto; }
.cs-loading { display: grid; gap: 10px; padding: 10px 0; }
.cs-loading .skeleton { height: 48px; border-radius: 16px; }
.cs-loading .skeleton:nth-child(2) { width: 70%; justify-self: end; }
.cs-empty { margin: auto; display: grid; justify-items: center; gap: 4px; text-align: center; color: var(--ink-3); padding: 20px; }
.cs-empty .i { --is: 44px; color: var(--sky-300); margin-bottom: 6px; }
.cs-empty b { color: var(--ink); font-size: 17px; }
.cs-more { align-self: center; margin: 0 0 8px; }
.cs-day { display: flex; justify-content: center; margin: 14px 0 6px; }
.cs-day span { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); background: rgba(255, 255, 255, .85); border: 1px solid var(--line); padding: 4px 11px; border-radius: 99px; }
.cm { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.cm.grouped { margin-top: 3px; }
.cm.mine { justify-content: flex-end; }
.cm-av { width: 30px; flex: none; }
.cm-av .av { font-size: 11px; }
.cm-bubble {
  position: relative;
  max-width: min(80%, 560px);
  padding: 8px 12px 5px;
  border-radius: 18px 18px 18px 6px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(6, 26, 61, .06);
}
.cm.grouped .cm-bubble { border-radius: 6px 18px 18px 6px; }
.cm.mine .cm-bubble { background: var(--grad-sky); color: #fff; border: 0; border-radius: 18px 18px 6px 18px; box-shadow: 0 6px 16px -10px rgba(10, 91, 194, .8); }
.cm.mine.grouped .cm-bubble { border-radius: 18px 6px 6px 18px; }
.cm-name { display: block; font-size: 12.5px; font-weight: 800; margin-bottom: 1px; }
.cm-bubble p { margin: 0; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-bubble.deleted p { font-style: italic; opacity: .6; }
.cm-meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; font-size: 10.5px; opacity: .65; margin-top: 2px; }
.cm-del { display: none; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: inherit; }
.cm-del .i { --is: 14px; }
.cm:hover .cm-del, .cm.show .cm-del { display: inline-grid; }
.cs-bar {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
}
/* con la tastiera aperta il margine per la barra Home non serve */
.chat-screen.kb .cs-bar { padding-bottom: 8px; }
.cs-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  max-height: 120px;
  resize: none;
  padding: 11px 16px;
  border-radius: 22px;
  border: 1.5px solid var(--line);
  background: var(--sky-50);
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  outline: none;
}
.cs-input:focus { border-color: var(--sky-500); background: #fff; }
.cs-send { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad-y); color: var(--navy-900); box-shadow: var(--sh-y); }
.cs-send .i { --is: 20px; }
.cs-send:active { transform: scale(.94); }
