  :root {
    --primario: #8F1113;
    --primario-chiaro: #B71918;
    --primario-scuro: #6A0C0C;
    --fondo: #EFEAE8;
    --scheda: #F6F2F1;
    --bianco: #FFFFFF;
    --tinta: #F8E3E1;
    --testo: #241414;
    --tenue: #6B5757;
    --linea: #E4D9D7;
    --rosa: #F8E3E1;
    --lilla: #ECE6FA;
    --giallo: #FBF0CC;
    --celeste: #E3EEFA;
    --verde: #E3F2E8;
    --raggio: 24px;
    --pillola: 999px;
    --ombra: 0 18px 50px -20px rgba(36, 20, 20, 0.28);
    --max: 1120px;
  }
  * { box-sizing: border-box; }
  @media (width < 900px) { :root { --telefono-mobile: clamp(188px, 61vw, 248px); } }
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--fondo);
    color: var(--testo);
    font: 500 17px/1.55 Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
  }
  h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.12; font-weight: 800; }
  h1 { font-size: clamp(36px, 7.4vw, 60px); }
  h2 { font-size: clamp(28px, 5vw, 42px); }
  h3 { font-size: 20px; line-height: 1.25; }
  p { margin: 0; }
  a { color: var(--primario); font-weight: 700; text-decoration: none; }
  a:hover { text-decoration: underline; }
  :focus-visible { outline: 3px solid var(--primario); outline-offset: 3px; border-radius: 8px; }
  .tenue { color: var(--tenue); }
  .contenitore { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
  section { padding: 72px 0; scroll-margin-top: 80px; overflow-x: clip; }
  @media (min-width: 900px) { section { padding: 110px 0; } }
  .intestazione { max-width: 640px; margin-bottom: 36px; }
  .intestazione h2 { margin-bottom: 14px; }
  .intestazione p { font-size: 18px; color: var(--tenue); }
  .logo { display: block; }

  /* Disponibilità: fino al lancio al posto dei pulsanti degli store */
  .in-arrivo {
    display: inline-flex; align-items: center; gap: 14px; padding: 12px 22px 12px 16px;
    border-radius: var(--pillola); background: var(--testo); color: #fff; min-height: 56px;
  }
  .in-arrivo .icone { display: flex; gap: 6px; }
  .in-arrivo .icone svg { width: 20px; height: 20px; }
  .in-arrivo b { display: block; font-size: 16px; font-weight: 800; line-height: 1.15; }
  .in-arrivo small { display: block; font-size: 12px; font-weight: 600; opacity: .8; line-height: 1.3; }
  .conto-lancio { display: block; margin-top: 7px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .conto-lancio[hidden] { display: none; }
  .in-arrivo.chiaro { background: var(--bianco); color: var(--testo); }
  .in-arrivo { text-align: left; max-width: 100%; }
  @media (max-width: 379px) { .in-arrivo .icone { display: none; } .in-arrivo { padding: 12px 20px; } .in-arrivo b { font-size: 15px; } }

  /* Pulsanti degli store: nascosti fino al lancio (togli «hidden» e cancella .in-arrivo) */
  .store { display: flex; flex-wrap: wrap; gap: 12px; }
  .store[hidden] { display: none; }
  .pulsante {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 22px; border-radius: var(--pillola); border: 0; min-height: 52px;
    font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important;
    background: var(--testo); color: #fff; transition: transform .18s ease, background .18s ease;
  }
  .pulsante:hover { background: #3a2626; transform: translateY(-1px); }
  .pulsante svg { width: 22px; height: 22px; flex: none; }
  .pulsante .due-righe { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
  .pulsante .due-righe small { font-size: 11px; font-weight: 600; opacity: .8; }

  /* Barra di navigazione della pagina */
  .nav {
    position: fixed; z-index: 50; left: 50%; transform: translateX(-50%);
    bottom: max(14px, env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 4px; padding: 6px;
    background: var(--testo); border-radius: var(--pillola);
    box-shadow: 0 14px 40px -12px rgba(36,20,20,.55);
    max-width: calc(100% - 24px);
  }
  .nav a {
    color: #fff; padding: 10px 14px; border-radius: var(--pillola); font-size: 14px; font-weight: 700;
    white-space: nowrap; text-decoration: none !important; transition: background .2s, color .2s;
  }
  .nav a.attivo { background: var(--tinta); color: var(--testo); }
  .nav .marchio-nav { display: none; }
  .nav .marchio-nav .logo { --l1: #fff; --l2: #F2B8B5; --l3: #E08A86; width: 22px; height: 23px; }
  @media (min-width: 900px) {
    .nav { top: 16px; bottom: auto; padding: 6px 6px 6px 16px; gap: 6px; }
    .nav .marchio-nav { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; font-size: 17px; font-weight: 800; padding: 0; }
    .nav .marchio-nav:hover { background: transparent; }
    .nav a.lancio { background: var(--primario); margin-left: 6px; }
  }
  @media (width < 900px) { .nav a.lancio { display: none; } .nav a { font-size: 13px; } }
  @media (max-width: 350px) { .nav a { font-size: 12px; padding: 9px 10px; } }

  /* Hero */
  .hero { position: relative; padding: 48px 0 40px; overflow: hidden; }
  @media (min-width: 900px) { .hero { padding: 96px 0 56px; min-height: min(100svh, 940px); display: flex; align-items: center; } }
  .hero .contenitore { position: relative; display: grid; gap: 40px; align-items: center; width: 100%; }
  @media (min-width: 900px) { .hero .contenitore { grid-template-columns: 1fr 1fr; gap: 32px; } }
  .hero-testo { position: relative; z-index: 2; max-width: 540px; }
  .hero-testo .marchio { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; margin-bottom: 24px; }
  .hero-testo .marchio .logo { width: 34px; height: 36px; }
  .hero-testo h1 { margin-bottom: 14px; }
  .hero-testo .sotto { font-size: clamp(19px, 2.6vw, 23px); font-weight: 700; margin-bottom: 12px; }
  .hero-testo .descrizione { font-size: 17px; color: var(--tenue); max-width: 470px; margin-bottom: 26px; }
  .nota-hero { margin-top: 16px; font-size: 14px; color: var(--tenue); }

  /* --P è la larghezza del telefono: logo, cubi e avvisi si misurano su quella */
  .hero-visivo { --P: min(262px, 68vw); position: relative; display: flex; justify-content: center; padding: 28px 0; }
  @media (min-width: 900px) { .hero-visivo { --P: 280px; padding: 24px 0; } }
  .palco { position: relative; z-index: 1; width: var(--P); }
  .hero-lancio-mobile { display: none; }
  #cubi { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
  @media (min-width: 900px) {
    #cubi {
      -webkit-mask-image: linear-gradient(90deg, transparent calc(50% - 30px), #000 calc(50% + 230px));
      mask-image: linear-gradient(90deg, transparent calc(50% - 30px), #000 calc(50% + 230px));
    }
  }
  @media (width < 900px) {
    #cubi {
      --lato-cubi: min(108vw, 520px);
      position: absolute; inset: 50% auto auto 50%;
      width: var(--lato-cubi); height: var(--lato-cubi);
      transform: translate(-50%, -50%);
    }
  }
  html.no-anim #cubi { display: none; }

  /* Mockup del telefono: le misure interne seguono la larghezza del telefono */
  .telefono {
    position: relative; container-type: inline-size;
    width: var(--P); aspect-ratio: 9 / 19.5; background: var(--testo); border-radius: 46px;
    padding: 9px; box-shadow: 0 30px 60px -24px rgba(36,20,20,.45), 0 0 0 1px rgba(36,20,20,.06);
  }
  .telefono::before { content: ''; position: absolute; top: 19px; left: 50%; transform: translateX(-50%); width: 31%; height: 24px; background: var(--testo); border-radius: 20px; z-index: 3; }
  .schermo {
    background: var(--bianco); border-radius: 38px; height: 100%; overflow: hidden; position: relative;
    padding: 17cqw 6cqw 0; display: flex; flex-direction: column; font-size: 4.3cqw; line-height: 1.3;
  }
  .schermo .titolo-app { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
  .schermo .titolo-app > div:first-child { font-size: 1.62em; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
  .schermo .titolo-app span { color: var(--tenue); font-weight: 700; }
  .schermo .azioni { display: flex; gap: 1.6cqw; align-items: center; }
  .pillola-piccola { border: 1px solid var(--linea); border-radius: var(--pillola); padding: .35em .9em; font-size: .92em; font-weight: 800; }
  .tondo-rosso { width: 9.4cqw; height: 9.4cqw; border-radius: 50%; background: var(--primario); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.3em; }
  .riga-settimana { display: flex; align-items: center; justify-content: space-between; margin: 3.4cqw 0 2.6cqw; font-weight: 800; font-size: .9em; }
  .riga-settimana i { width: 8.4cqw; height: 8.4cqw; border-radius: 50%; background: var(--scheda); display: grid; place-items: center; font-style: normal; color: var(--testo); }
  .settimana { display: flex; justify-content: space-between; gap: 1.2cqw; margin-bottom: 4cqw; }
  .giorno { flex: 1; aspect-ratio: 1 / 1.62; border-radius: var(--pillola); background: var(--scheda); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05em; font-size: .78em; color: var(--tenue); font-weight: 700; }
  .giorno b { font-size: 1.45em; color: var(--testo); font-weight: 800; line-height: 1.1; }
  .giorno i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: var(--primario); }
  .giorno.oggi { background: var(--primario); color: #fff; }
  .giorno.oggi b { color: #fff; }
  .giorno.oggi i { background: #fff; }
  .riga-giorno { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 2.6cqw; }
  .riga-giorno span { color: var(--tenue); font-weight: 600; }
  .impegno { display: grid; grid-template-columns: 14cqw 1fr; gap: 2.6cqw; margin-bottom: 2.4cqw; align-items: stretch; }
  .impegno .ora { font-size: .95em; font-weight: 800; line-height: 1.2; padding-top: 2.6cqw; }
  .impegno .ora small { display: block; color: var(--tenue); font-weight: 600; font-size: .92em; }
  .card-pastello { border-radius: 4.6cqw; padding: 3cqw 3.6cqw; font-weight: 800; line-height: 1.25; }
  .card-pastello small { display: block; font-weight: 600; font-size: .86em; margin-top: .15em; }
  .card-pastello.rosa { background: var(--rosa); } .card-pastello.rosa small { color: var(--primario); }
  .card-pastello.lilla { background: var(--lilla); } .card-pastello.lilla small { color: #5B3FA6; }
  .card-pastello.giallo { background: var(--giallo); } .card-pastello.giallo small { color: #7A5A00; }
  .card-pastello.celeste { background: var(--celeste); } .card-pastello.celeste small { color: #1F4E8C; }
  .corsi { background: var(--scheda); border-radius: 4.6cqw; padding: 3cqw 3.8cqw; display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
  .corsi small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; }
  .corsi span { color: var(--primario); font-size: .92em; }
  .d-schermo .corsi button { border: 0; background: none; color: var(--primario); cursor: pointer; font-weight: 800; padding: 8px 0 8px 8px; }
  .d-corsi-scelta { display: grid; gap: 6px; margin-bottom: 12px; }
  .d-corsi-scelta label { display: flex; gap: 7px; align-items: center; min-height: 32px; }
  .titoletto { font-weight: 800; margin: 4.4cqw 0 2.6cqw; }
  .esame-riga { display: grid; grid-template-columns: 12cqw 1fr auto; gap: 2.8cqw; align-items: center; margin-bottom: 2.4cqw; }
  .data-esame { width: 12cqw; height: 12.6cqw; border-radius: 3.6cqw; background: var(--testo); color: #fff; display: grid; place-content: center; text-align: center; font-weight: 800; line-height: 1; font-size: 1.12em; }
  .data-esame small { display: block; font-size: .62em; font-weight: 700; margin-top: .25em; }
  .data-esame.rossa { background: var(--primario); }
  .esame-riga div:nth-child(2) { font-weight: 800; line-height: 1.2; min-width: 0; }
  .esame-riga div:nth-child(2) small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; }
  .stato-esame { font-weight: 800; font-size: .9em; color: var(--primario); white-space: nowrap; }
  .stato-esame.tenue { color: var(--tenue); font-weight: 700; }
  .stato-esame.bottone { background: var(--primario); color: #fff; border-radius: var(--pillola); padding: .5em 1em; }
  .nav-app { position: absolute; left: 4.5cqw; right: 4.5cqw; bottom: 4.5cqw; height: 17cqw; background: var(--testo); border-radius: var(--pillola); display: flex; align-items: center; padding: 1.6cqw; gap: 2cqw; }
  .nav-app .attiva { background: var(--tinta); color: var(--testo); border-radius: var(--pillola); height: 100%; display: flex; align-items: center; gap: 2.4cqw; padding: 0 5cqw; font-weight: 800; }
  .nav-app .icona { flex: 1; display: grid; place-items: center; color: #fff; }
  .nav-app svg { width: 5.6cqw; height: 5.6cqw; }

  /* Avvisi intorno al telefono, come arrivano sul telefono vero */
  .notifica {
    position: absolute; z-index: 3; width: min(272px, 74vw);
    display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start;
    padding: 11px 14px 12px 11px; border-radius: 20px;
    background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
    box-shadow: 0 18px 40px -20px rgba(36,20,20,.5), 0 0 0 1px rgba(36,20,20,.07);
    font-size: 13px; line-height: 1.35;
  }
  .notifica .ico { width: 36px; height: 36px; border-radius: 9px; background: #fff; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--linea); }
  .notifica .ico .logo { width: 22px; height: 23px; }
  .notifica .testa { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--tenue); font-weight: 700; margin-bottom: 1px; }
  .notifica b { display: block; font-weight: 800; font-size: 13.5px; }
  .notifica.n1 { top: 9%; left: calc(50% - min(272px, 74vw) / 2 - 10px); }
  .notifica.n2 { top: 46%; right: -38%; display: none; }
  .notifica.n3 { bottom: 15%; left: calc(50% - min(272px, 74vw) / 2 + 10px); }
  @media (min-width: 600px) { .notifica.n2 { display: grid; } .notifica.n1 { left: -34%; } .notifica.n3 { left: -28%; } }
  @media (min-width: 900px) {
    .notifica.n1 { top: 11%; left: -46%; }
    .notifica.n2 { top: 47%; right: -52%; }
    .notifica.n3 { bottom: 13%; left: -40%; }
  }

  /* Prova l'app: le voci a lato e il telefono interattivo */
  .demo { display: grid; gap: 18px; grid-template-areas: "telefono" "voci"; }
  @media (min-width: 900px) { .demo { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "voci telefono"; gap: 56px; align-items: start; } }
  .d-voci { grid-area: voci; display: flex; gap: 8px; }
  .d-voce {
    flex: none; display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 6px 15px 6px 6px;
    border: 1px solid var(--linea); background: var(--bianco); border-radius: var(--pillola);
    font: inherit; color: var(--testo); cursor: pointer; text-align: left; transition: background .2s, box-shadow .2s;
  }
  .d-voce[aria-selected="true"] { background: var(--testo); color: #fff; border-color: var(--testo); }
  .d-icona { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
  .d-icona svg { width: 17px; height: 17px; }
  .d-testi { display: block; min-width: 0; }
  .d-titolo { display: block; font-weight: 800; font-size: 14.5px; white-space: nowrap; }
  .d-desc, .d-prova { display: none; }
  @media (min-width: 900px) {
    .d-voci { flex-direction: column; overflow: visible; margin: 0; padding: 0; gap: 4px; position: sticky; top: 96px; }
    .d-voce { border-radius: 20px; padding: 12px 18px 12px 12px; align-items: flex-start; gap: 14px; border-color: transparent; background: transparent; }
    .d-voce:hover { background: rgba(255,255,255,.55); }
    .d-voce[aria-selected="true"] { background: var(--bianco); color: var(--testo); border-color: transparent; box-shadow: var(--ombra); }
    .d-icona { width: 40px; height: 40px; border-radius: 12px; }
    .d-icona svg { width: 19px; height: 19px; }
    .d-titolo { font-size: 17px; padding-top: 9px; white-space: normal; }
    .d-voce[aria-selected="true"] .d-desc { display: block; color: var(--tenue); font-size: 15px; font-weight: 500; line-height: 1.5; margin-top: 6px; }
    .d-voce[aria-selected="true"] .d-prova { display: block; color: var(--primario); font-size: 14px; font-weight: 700; margin-top: 8px; }
  }
  .d-palco { grid-area: telefono; display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .d-pagine, .d-titolo-breve, .sim-esempio { display: none; }
  .d-nota { max-width: 360px; font-size: 13px; color: var(--tenue); text-align: center; }

  .d-telefono {
    position: relative; container-type: inline-size; width: min(340px, 88vw); aspect-ratio: 9 / 19.5;
    background: var(--testo); border-radius: 50px; padding: 10px;
    box-shadow: 0 34px 70px -28px rgba(36,20,20,.5), 0 0 0 1px rgba(36,20,20,.06);
  }
  .d-telefono::before { content: ''; position: absolute; top: 21px; left: 50%; transform: translateX(-50%); width: 30%; height: 26px; background: var(--testo); border-radius: 20px; z-index: 6; }
  .d-schermo { position: relative; height: 100%; border-radius: 40px; background: #fff; overflow: hidden; font-size: 4.1cqw; line-height: 1.3; color: var(--testo); }
  .d-schermo:focus { outline: none; }
  .d-schermo button { font: inherit; color: inherit; }
  .d-vista { position: absolute; inset: 0; overflow-y: auto; padding: 16cqw 5.5cqw 27cqw; scrollbar-width: none; }
  .d-vista::-webkit-scrollbar { display: none; }
  .d-vista.senza-nav { padding-bottom: 8cqw; }
  .d-vista.entra { animation: d-entra .35s ease both; }
  @keyframes d-entra { from { opacity: 0; transform: translateX(4%); } to { opacity: 1; transform: none; } }
  .d-vuoto { color: var(--tenue); padding: 4cqw; }

  /* Pezzi comuni delle schermate */
  .d-testa { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; margin-bottom: 3.4cqw; }
  .d-grande { font-size: 7.6cqw; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
  .d-grande span { color: var(--tenue); }
  .d-sotto { color: var(--tenue); margin: -1.6cqw 0 3.6cqw; }
  .d-indietro { display: inline-grid; place-items: center; width: 9cqw; height: 9cqw; margin: -1cqw 0 2.4cqw -1.6cqw; border: 0; background: none; cursor: pointer; border-radius: 50%; }
  .d-indietro svg { width: 6cqw; height: 6cqw; }
  .d-pill { display: inline-block; padding: .45em .95em; border-radius: var(--pillola); background: var(--tinta); color: var(--primario); font-weight: 800; font-size: .95em; white-space: nowrap; }
  .d-btn { display: flex; align-items: center; justify-content: center; gap: 2cqw; width: 100%; min-height: 12.5cqw; border: 0; border-radius: var(--pillola); background: var(--primario); color: #fff !important; font-weight: 800; cursor: pointer; padding: 0 5cqw; transition: transform .15s, background .2s; }
  .d-btn:active { transform: scale(.98); }
  .d-btn.chiaro { background: var(--scheda); color: var(--testo) !important; }
  .d-btn.contorno { background: #fff; color: var(--testo) !important; box-shadow: inset 0 0 0 1px var(--linea); }
  .d-btn[disabled] { opacity: .55; cursor: default; }
  .d-btn.piccolo { width: auto; min-height: 9.6cqw; padding: 0 4.4cqw; font-size: .92em; }
  .d-due { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6cqw; }
  .d-scheda { background: var(--scheda); border-radius: 5cqw; padding: 3.6cqw 4.2cqw; }
  .d-scheda.rosa { background: var(--rosa); }
  .d-scheda small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; }
  .d-scheda.rosa small.rosso, .d-rosso { color: var(--primario) !important; }
  .d-voce-lista { display: flex; align-items: center; gap: 3cqw; width: 100%; text-align: left; border: 0; background: var(--scheda); border-radius: 5cqw; padding: 3.6cqw 4cqw; cursor: pointer; margin-bottom: 2.6cqw; }
  .d-voce-lista b { display: block; font-weight: 800; }
  .d-voce-lista small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; }
  .d-voce-lista > span:not(.ico):not(.freccia):not(.d-pill) { flex: 1; min-width: 0; }
  .d-voce-lista .freccia { color: var(--tenue); font-weight: 700; font-size: 1.2em; }
  .d-voce-lista .ico { width: 10cqw; height: 10cqw; border-radius: 50%; background: var(--tinta); color: var(--primario); display: grid; place-items: center; flex: none; }
  .d-voce-lista .ico svg { width: 5cqw; height: 5cqw; }
  .d-titoletto { font-weight: 800; margin: 5cqw 0 2.6cqw; }
  .d-piccola { font-size: .86em; color: var(--tenue); margin-top: 3cqw; }
  .d-segmenti { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--scheda); border-radius: var(--pillola); padding: 1.2cqw; margin-bottom: 3.6cqw; }
  .d-segmenti button { border: 0; background: none; border-radius: var(--pillola); min-height: 9.6cqw; font-weight: 700; color: var(--tenue) !important; cursor: pointer; }
  .d-segmenti button[aria-pressed="true"] { background: #fff; color: var(--testo) !important; font-weight: 800; box-shadow: 0 2px 6px -2px rgba(36,20,20,.2); }

  /* Agenda */
  .d-tondo { width: 10.5cqw; height: 10.5cqw; border-radius: 50%; border: 0; background: var(--primario); color: #fff !important; display: grid; place-items: center; font-size: 1.5em; font-weight: 700; cursor: pointer; line-height: 1; }
  .d-oggi { border: 1px solid var(--linea); background: #fff; border-radius: var(--pillola); padding: 0 3.6cqw; min-height: 10.5cqw; font-weight: 800; cursor: pointer; }
  .d-settimana { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3cqw; font-weight: 800; font-size: .95em; }
  .d-settimana button { width: 9.6cqw; height: 9.6cqw; border-radius: 50%; border: 0; background: var(--scheda); cursor: pointer; display: grid; place-items: center; }
  .d-settimana button[disabled] { opacity: .35; cursor: default; }
  .d-settimana svg { width: 4.4cqw; height: 4.4cqw; }
  .d-giorni { display: flex; gap: 1.3cqw; margin-bottom: 4.4cqw; }
  .d-giorni button { flex: 1; aspect-ratio: 1 / 1.62; border: 0; border-radius: var(--pillola); background: var(--scheda); color: var(--tenue) !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1em; font-size: .8em; font-weight: 700; cursor: pointer; padding: 0; }
  .d-giorni b { font-size: 1.45em; color: var(--testo); font-weight: 800; line-height: 1.1; }
  .d-giorni i { width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: var(--primario); }
  .d-giorni i.vuoto { background: transparent; }
  .d-giorni button[aria-pressed="true"] { background: var(--primario); color: #fff !important; }
  .d-giorni button[aria-pressed="true"] b { color: #fff; }
  .d-giorni button[aria-pressed="true"] i { background: #fff; }
  .d-giorni button[aria-pressed="true"] i.vuoto { background: transparent; }
  .d-impegni .impegno { animation: d-card .45s ease both; }
  @keyframes d-card { from { opacity: 0; transform: translateX(-5%); } to { opacity: 1; transform: none; } }
  .card-pastello.annullata { background: var(--scheda); color: var(--tenue); }
  .card-pastello.annullata small { color: var(--tenue); }
  .card-pastello.annullata b { text-decoration: line-through; font-weight: 800; }
  .card-pastello.esame { background: var(--testo); color: #fff; }
  .card-pastello.esame small { color: #F2B8B5; }
  .card-pastello.nuova { box-shadow: 0 0 0 2px var(--primario); }
  .d-nessuno { background: var(--scheda); border-radius: 4.6cqw; padding: 4cqw; color: var(--tenue); font-weight: 600; margin-bottom: 2.4cqw; }
  .d-esami button.esame-riga { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; padding: 0; }

  /* Fogli e finestre dentro il telefono */
  .d-velo { position: absolute; inset: 0; background: rgba(36,20,20,.38); z-index: 7; animation: d-sfuma .25s ease both; }
  @keyframes d-sfuma { from { opacity: 0; } }
  .d-foglio { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; scrollbar-width: none; z-index: 8; background: #fff; border-radius: 7cqw 7cqw 0 0; padding: 4cqw 5.5cqw 7cqw; animation: d-sale .3s ease both; }
  .d-foglio::before { content: ''; display: block; width: 12cqw; height: 1.3cqw; border-radius: 1cqw; background: var(--linea); margin: 0 auto 4cqw; }
  @keyframes d-sale { from { transform: translateY(100%); } }
  .d-foglio.dialogo { left: 6cqw; right: 6cqw; bottom: auto; top: 50%; border-radius: 6cqw; padding: 6cqw 5.5cqw 5cqw; animation: d-appare .25s ease both; transform: translateY(-50%); }
  .d-foglio.dialogo::before { display: none; }
  .d-foglio-chiudi { display: none; }
  @keyframes d-appare { from { opacity: 0; transform: translateY(-46%) scale(.96); } }
  .d-foglio h4 { margin: 0 0 1.6cqw; font-size: 1.3em; font-weight: 800; letter-spacing: -0.02em; }
  .d-foglio p { color: var(--tenue); margin-bottom: 4cqw; }
  .d-campo { margin-bottom: 3.6cqw; }
  .d-campo > span { display: block; font-size: .9em; font-weight: 700; color: var(--tenue); margin-bottom: 1.6cqw; }
  .d-campo input, .d-campo select { width: 100%; border: 1px solid var(--linea); border-radius: var(--pillola); padding: 0 4cqw; min-height: 11cqw; font: inherit; font-size: 16px; color: var(--testo); background: #fff; }
  .d-campo select { appearance: none; -webkit-appearance: none; }
  .d-scelte { display: flex; gap: 1.6cqw; flex-wrap: wrap; }
  .d-scelte button { border: 0; background: var(--scheda); border-radius: var(--pillola); min-height: 9.6cqw; min-width: 9.6cqw; padding: 0 3cqw; font-weight: 800; cursor: pointer; }
  .d-scelte button[aria-pressed="true"] { background: var(--primario); color: #fff !important; }
  .d-voti { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1.6cqw; }
  .d-voti button { padding: 0; min-width: 0; }

  /* Banner (avvisi) e toast */
  .d-banner {
    position: absolute; left: 3cqw; right: 3cqw; top: 3cqw; z-index: 9; display: grid; grid-template-columns: 9.5cqw 1fr; gap: 2.6cqw;
    padding: 3cqw 3.6cqw 3.2cqw 3cqw; border-radius: 5.5cqw; background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: 0 14px 34px -16px rgba(36,20,20,.55), 0 0 0 1px rgba(36,20,20,.08);
    font-size: .92em; line-height: 1.3; transform: translateY(-140%); transition: transform .45s cubic-bezier(.2,.9,.3,1.2); pointer-events: none;
  }
  .d-banner.visibile { transform: none; }
  .d-banner .ico { width: 9.5cqw; height: 9.5cqw; border-radius: 2.6cqw; background: #fff; box-shadow: inset 0 0 0 1px var(--linea); display: grid; place-items: center; }
  .d-banner .ico .logo { width: 6cqw; height: 6.3cqw; }
  .d-banner .testa { display: flex; justify-content: space-between; color: var(--tenue); font-weight: 700; font-size: .9em; }
  .d-banner b { display: block; font-weight: 800; }
  .d-toast { position: absolute; left: 50%; bottom: 25cqw; z-index: 9; transform: translate(-50%, 20%); opacity: 0; background: var(--testo); color: #fff; border-radius: 4cqw; padding: 2.6cqw 4cqw; font-size: .88em; font-weight: 700; width: max-content; max-width: 84%; text-align: center; transition: opacity .25s, transform .25s; pointer-events: none; }
  .d-toast.visibile { opacity: 1; transform: translate(-50%, 0); }
  .d-toast.alto { bottom: 8cqw; }

  /* Barra delle schede */
  .d-nav { position: absolute; left: 4.5cqw; right: 4.5cqw; bottom: 4.5cqw; height: 16.5cqw; z-index: 5; background: var(--testo); border-radius: var(--pillola); display: flex; align-items: center; padding: 1.6cqw; gap: 1.2cqw; transition: transform .3s ease, opacity .3s; }
  .d-nav.nascosta { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .d-nav button { flex: 1; height: 100%; border: 0; background: none; color: #fff !important; border-radius: var(--pillola); display: flex; align-items: center; justify-content: center; gap: 2cqw; cursor: pointer; font-weight: 800; padding: 0; }
  .d-nav button span { display: none; }
  .d-nav button[aria-current="page"] { flex: 2.4; background: var(--tinta); color: var(--testo) !important; }
  .d-nav button[aria-current="page"] span { display: inline; }
  .d-nav svg { width: 5.6cqw; height: 5.6cqw; flex: none; }

  /* Percorso */
  .d-anni { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4cqw; margin: 3.6cqw 0 4cqw; }
  .d-anni button { border: 0; background: var(--scheda); border-radius: 5cqw; padding: 2.8cqw 1.6cqw 3cqw; cursor: pointer; text-align: center; font-size: .86em; font-weight: 700; color: var(--tenue) !important; }
  .d-anni b { display: block; font-size: 1.45em; color: var(--testo); font-weight: 800; margin: .1em 0 .3em; }
  .d-anni i { display: block; height: 1.3cqw; border-radius: 1cqw; background: var(--linea); margin: 0 2cqw .5em; overflow: hidden; }
  .d-anni i::after { content: ''; display: block; height: 100%; width: var(--p); background: var(--primario); }
  .d-anni em { font-style: normal; font-weight: 800; color: var(--primario); font-size: .95em; }
  .d-anni em.giallo { color: #8A6400; }
  .d-anni button[aria-pressed="true"] { background: var(--primario); color: #ffd6d4 !important; }
  .d-anni button[aria-pressed="true"] b, .d-anni button[aria-pressed="true"] em { color: #fff; }
  .d-anni button[aria-pressed="true"] i { background: rgba(255,255,255,.3); }
  .d-anni button[aria-pressed="true"] i::after { background: #fff; }
  .d-riepilogo { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; background: var(--rosa); border-radius: 4.6cqw; padding: 2.8cqw 3.6cqw; font-size: .88em; font-weight: 700; margin-bottom: 3cqw; }
  .d-riepilogo button { border: 0; background: #fff; border-radius: var(--pillola); padding: 1.6cqw 3cqw; font-weight: 800; cursor: pointer; }
  .d-tragitto { position: relative; }
  .d-tragitto svg.linea { position: absolute; left: 0; top: 0; width: 26cqw; height: 100%; overflow: visible; pointer-events: none; }
  .d-tappa { position: relative; display: grid; grid-template-columns: 26cqw 1fr; align-items: center; width: 100%; min-height: 17cqw; border: 0; background: none; padding: 0; text-align: left; cursor: default; }
  .d-tappa.tocca { cursor: pointer; }
  .d-nodo { width: 12cqw; height: 12cqw; border-radius: 3.6cqw; background: var(--testo); color: #fff; display: grid; place-content: center; text-align: center; font-weight: 800; line-height: 1; font-size: 1.05em; position: relative; z-index: 1; }
  .d-tappa.dispari .d-nodo { margin-left: 10cqw; }
  .d-tappa.pari .d-nodo { margin-left: 2cqw; }
  .d-tappa .d-nodo small { display: block; font-size: .62em; font-weight: 700; margin-top: .25em; color: inherit; }
  .d-nodo.prenotato { background: var(--primario); }
  .d-nodo.dare { background: #fff; box-shadow: inset 0 0 0 2px #E2CFCD; color: var(--tenue); }
  .d-nodo.dare svg { width: 4.6cqw; height: 4.6cqw; }
  .d-nodo.simulato { background: var(--rosa); color: var(--primario); box-shadow: inset 0 0 0 2px var(--primario); }
  .d-tappa b { display: block; font-weight: 800; line-height: 1.2; }
  .d-tappa small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; margin-top: .15em; }
  .d-tappa small.rosso { color: var(--primario); font-weight: 700; }
  .d-medie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; margin-bottom: 3cqw; }
  .d-medie div { border-radius: 4.6cqw; padding: 3.4cqw 1cqw; text-align: center; background: var(--scheda); }
  .d-medie div:first-child { background: var(--primario); color: #fff; }
  .d-medie div:first-child small { color: #ffd6d4; }
  .d-medie b { display: block; font-size: 1.5em; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
  .d-medie small { display: block; font-size: .78em; font-weight: 700; color: var(--tenue); margin-top: .2em; }
  .d-barra { height: 1.6cqw; border-radius: 1cqw; background: var(--linea); overflow: hidden; margin-top: 1.6cqw; }
  .d-barra i { display: block; height: 100%; background: var(--primario); border-radius: 1cqw; transition: width .6s ease; }
  .d-libretto-riga { display: flex; justify-content: space-between; gap: 2cqw; padding: 2.6cqw 0; border-bottom: 1px solid var(--scheda); }
  .d-libretto-riga small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; }
  .d-libretto-riga b { font-weight: 800; white-space: nowrap; }
  .d-risultato { background: var(--rosa); border-radius: 5cqw; padding: 3.6cqw 4cqw; display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; margin: 4cqw 0; }
  .d-risultato div + div { border-left: 1px solid rgba(143,17,19,.2); padding-left: 3cqw; }
  .d-risultato small { display: block; color: var(--primario); font-weight: 700; font-size: .86em; }
  .d-risultato b { display: block; font-size: 1.7em; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
  .d-risultato span { display: block; font-size: .82em; color: var(--tenue); font-weight: 600; }
  .d-esami-scelta { display: flex; gap: 2cqw; overflow-x: auto; scrollbar-width: none; margin: 0 -5.5cqw 3.6cqw; padding: 0 5.5cqw; }
  .d-esami-scelta button { flex: none; border: 0; background: var(--scheda); border-radius: 4.6cqw; padding: 2.4cqw 3.6cqw; text-align: left; cursor: pointer; font-weight: 800; }
  .d-esami-scelta button small { display: block; font-size: .8em; font-weight: 600; opacity: .8; }
  .d-esami-scelta button[aria-pressed="true"] { background: var(--testo); color: #fff !important; }
  .d-esame-select { display: none; }

  /* Esame */
  .d-appello { display: grid; grid-template-columns: 26cqw 1fr; gap: 4cqw; align-items: center; margin-bottom: 4cqw; }
  .d-data { aspect-ratio: 1 / 1.05; border-radius: 7cqw; background: var(--primario); color: #fff; display: grid; place-content: center; text-align: center; font-weight: 700; line-height: 1.1; }
  .d-data b { font-size: 2.3em; font-weight: 800; line-height: 1.05; }
  .d-ora { font-size: 1.75em; font-weight: 800; letter-spacing: -0.02em; }
  .d-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6cqw; margin-bottom: 3cqw; }
  .d-tiles div { background: var(--scheda); border-radius: 5cqw; padding: 3.4cqw 3.8cqw 4cqw; }
  .d-tiles div.rosa { background: var(--rosa); }
  .d-tiles small { display: block; font-size: .86em; font-weight: 700; color: var(--tenue); }
  .d-tiles div.rosa small { color: var(--primario); }
  .d-tiles b { display: block; font-size: 1.12em; font-weight: 800; margin-top: .3em; line-height: 1.2; }
  .d-fisso { position: sticky; bottom: 0; padding-top: 3cqw; background: linear-gradient(transparent, #fff 30%); margin-top: 3cqw; }

  /* Piano */
  .d-distanza { display: flex; align-items: center; gap: 3cqw; color: var(--tenue); font-size: .9em; font-weight: 600; padding: 1cqw 0 1cqw 5cqw; }
  .d-distanza::before { content: ''; width: 1cqw; height: 6cqw; border-radius: 1cqw; background: #D9C3C1; }
  .d-obiettivo { background: var(--rosa); border-radius: 6cqw; padding: 4.4cqw 4.6cqw; margin-top: 4cqw; }
  .d-obiettivo small { display: block; color: var(--primario); font-weight: 700; }
  .d-obiettivo b { display: block; font-size: 1.35em; font-weight: 800; margin: .2em 0 .35em; letter-spacing: -0.02em; }
  .d-obiettivo p { margin-bottom: 3cqw; line-height: 1.4; }
  .d-obiettivo .d-scelte button { background: #fff; }
  .d-aggiungi-lista .d-voce-lista { background: #fff; box-shadow: inset 0 0 0 1px var(--linea); }

  /* Studio */
  .d-anello { position: relative; width: 66cqw; aspect-ratio: 1; margin: 2cqw auto 5cqw; }
  .d-anello svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .d-anello circle { transition: stroke-dashoffset .15s linear; }
  .d-anello .centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
  .d-anello .tempo { font-size: 4.2em; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
  .d-anello .di { color: var(--tenue); margin-top: 1.6cqw; }
  .d-anello .sessione { color: var(--primario); font-weight: 800; }
  .d-consiglio { text-align: center; color: var(--primario); font-weight: 700; margin: -2cqw 0 3.6cqw; min-height: 1.3em; }
  .d-contatore { display: flex; align-items: center; justify-content: space-between; margin-top: 3.6cqw; font-weight: 700; color: var(--tenue); }
  .d-contatore div { display: flex; align-items: center; gap: 3cqw; }
  .d-contatore button { width: 10cqw; height: 10cqw; border-radius: 50%; border: 0; background: var(--scheda); font-weight: 800; font-size: 1.2em; cursor: pointer; }
  .d-contatore b { color: var(--testo); font-size: 1.15em; min-width: 3cqw; text-align: center; }

  /* Aule */
  .d-mappa { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; background: var(--rosa); border-radius: 6cqw; padding: 4.2cqw 4.6cqw; text-decoration: none !important; color: var(--testo); margin-bottom: 3.6cqw; }
  .d-mappa b { display: block; font-weight: 800; }
  .d-mappa small { display: block; color: var(--primario); font-weight: 600; font-size: .88em; }
  .d-mappa svg { width: 6cqw; height: 6cqw; color: var(--primario); flex: none; }
  .d-chips { display: flex; gap: 2cqw; margin-bottom: 4cqw; }
  .d-chips button { border: 1px solid var(--linea); background: #fff; border-radius: var(--pillola); min-height: 10cqw; padding: 0 3.8cqw; font-weight: 800; cursor: pointer; white-space: nowrap; font-size: .95em; }
  .d-chips button[aria-pressed="true"] { background: var(--testo); border-color: var(--testo); color: #fff !important; }
  .d-aula { display: grid; grid-template-columns: 12.5cqw 1fr; gap: 3.4cqw; align-items: center; margin-bottom: 3cqw; }
  .d-aula .sigla { width: 12.5cqw; height: 12.5cqw; border-radius: 4cqw; display: grid; place-items: center; font-weight: 800; font-size: .95em; }
  .d-aula b { display: block; font-weight: 800; }
  .d-aula small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; }
  .d-luogo { background: var(--scheda); border-radius: 5cqw; padding: 3.6cqw 4cqw; margin-bottom: 2.6cqw; }
  .d-luogo b { display: block; font-weight: 800; margin-bottom: 1cqw; }
  .d-luogo div { display: flex; justify-content: space-between; gap: 2cqw; font-size: .88em; color: var(--tenue); font-weight: 600; }
  .d-luogo div span:last-child { color: var(--testo); font-weight: 800; text-align: right; }

  /* Tasse */
  .d-lette { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; color: var(--tenue); font-size: .9em; margin-bottom: 4cqw; }
  .d-rata { background: var(--scheda); border-radius: 6cqw; padding: 4.4cqw 4.6cqw; margin-bottom: 3cqw; }
  .d-rata .sopra { display: flex; justify-content: space-between; gap: 3cqw; font-weight: 800; line-height: 1.25; }
  .d-rata .sopra > span:first-child { min-width: 0; }
  .d-rata .importo { font-size: 1.3em; white-space: nowrap; }
  .d-rata small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; }
  .d-rata .scade { color: var(--primario); font-weight: 800; margin: 2cqw 0 2.4cqw; font-size: .92em; }
  .d-rata .voci { border-top: 1px solid var(--linea); padding-top: 2cqw; margin-bottom: 3.4cqw; font-size: .88em; color: var(--tenue); }
  .d-rata .voci div { display: flex; justify-content: space-between; }
  .d-codice { margin-top: 3cqw; font-size: .88em; color: var(--tenue); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 2cqw; }
  .d-codice b { display: block; color: var(--testo); font-size: 1.05em; letter-spacing: .02em; }
  .d-codice button { border: 0; background: #fff; border-radius: var(--pillola); padding: 1.6cqw 3.4cqw; font-weight: 800; cursor: pointer; color: var(--primario) !important; }
  .d-pagata { display: flex; justify-content: space-between; gap: 3cqw; padding: 2.4cqw 0; }
  .d-pagata b { display: block; font-weight: 800; line-height: 1.25; }
  .d-pagata small { display: block; color: var(--tenue); font-weight: 600; font-size: .86em; }
  .d-pagata > span:last-child { font-weight: 800; white-space: nowrap; }

  /* Profilo */
  .d-tessera { background: var(--testo); color: #fff; border-radius: 6cqw; padding: 4.4cqw 4.8cqw; margin-bottom: 4cqw; }
  .d-tessera small { display: block; color: #d9c9c9; font-weight: 700; font-size: .86em; }
  .d-tessera b { display: block; font-size: 1.35em; font-weight: 800; margin: .1em 0; }
  .d-gruppo { font-weight: 800; margin: 4.4cqw 0 2.2cqw; }
  .d-interruttore { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; width: 100%; border: 0; background: var(--scheda); border-radius: 5cqw; padding: 3.2cqw 4cqw; text-align: left; cursor: pointer; margin-bottom: 2cqw; }
  .d-interruttore b { display: block; font-weight: 800; }
  .d-interruttore small { display: block; color: var(--tenue); font-weight: 600; font-size: .84em; }
  .d-interruttore i { flex: none; width: 12cqw; height: 7.2cqw; border-radius: 4cqw; background: var(--linea); position: relative; transition: background .2s; }
  .d-interruttore i::after { content: ''; position: absolute; top: .9cqw; left: .9cqw; width: 5.4cqw; height: 5.4cqw; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
  .d-interruttore[aria-checked="true"] i { background: var(--primario); }
  .d-interruttore[aria-checked="true"] i::after { transform: translateX(4.8cqw); }

  @media (prefers-reduced-motion: reduce) {
    .d-vista.entra, .d-impegni .impegno, .d-velo, .d-foglio, .d-foglio.dialogo { animation: none !important; }
    .d-banner, .d-toast, .d-nav { transition: none !important; }
  }

  /* Simulatore */
  .simulatore { display: grid; gap: 20px; }
  @media (min-width: 900px) { .simulatore { grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; } }
  .pannello { background: var(--bianco); border-radius: var(--raggio); padding: 24px; }
  .pannello h3 { margin-bottom: 6px; }
  .pannello .spiega { color: var(--tenue); font-size: 15px; margin-bottom: 18px; }
  .medie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
  .media { border-radius: 18px; padding: 16px 8px 12px; text-align: center; background: var(--scheda); }
  .media b { display: block; font-size: clamp(23px, 5vw, 32px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
  .media small { display: block; font-size: 11.5px; font-weight: 700; color: var(--tenue); margin-top: 6px; }
  .media.rosso { background: var(--primario); color: #fff; } .media.rosso small { color: #ffd6d4; }
  .media.rosa { background: var(--rosa); }
  .media .delta { display: block; font-size: 12px; font-weight: 800; margin-top: 4px; min-height: 17px; font-variant-numeric: tabular-nums; }
  .media .delta.su { color: #1C6B3C; } .media.rosso .delta.su { color: #C9F3D6; }
  .media .delta.giu { color: var(--primario); } .media.rosso .delta.giu { color: #ffd6d4; }
  .cfu-barra { background: var(--scheda); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 800; margin-bottom: 18px; }
  .cfu-barra .traccia { height: 6px; background: var(--linea); border-radius: 3px; margin-top: 8px; overflow: hidden; }
  .cfu-barra .pieno { height: 100%; background: var(--primario); border-radius: 3px; width: 55%; transition: width .5s ease; }
  .cfu-barra .fila { display: flex; justify-content: space-between; } .cfu-barra .fila span:last-child { color: var(--tenue); font-weight: 600; }
  .campo { margin-bottom: 18px; }
  .campo:last-child { margin-bottom: 0; }
  .nome-campo { display: block; font-size: 13px; font-weight: 700; color: var(--tenue); margin-bottom: 8px; }
  .campo input[type=text] { width: 100%; border: 1px solid var(--linea); border-radius: 14px; padding: 13px 16px; font: inherit; font-weight: 700; background: var(--scheda); color: var(--testo); }
  .scelte { display: grid; gap: 6px; }
  .scelte.voti { grid-template-columns: repeat(7, 1fr); }
  .scelte.quattro { grid-template-columns: repeat(4, 1fr); }
  .scelte button { border: 1px solid var(--linea); background: var(--scheda); border-radius: var(--pillola); min-height: 44px; padding: 0; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--testo); transition: background .15s, color .15s; }
  .scelte button:hover { background: var(--tinta); }
  .scelte button[aria-pressed="true"] { background: var(--primario); border-color: var(--primario); color: #fff; }
  .risultato { background: var(--rosa); border-radius: 18px; padding: 16px 18px; font-size: 15px; }
  .risultato b { font-weight: 800; }
  .nota-media { font-size: 13px; color: var(--tenue); margin-top: 10px; }

  /* Le tre schede sotto il telefono interattivo */
  .altre-funzioni {
    --ombra-mini: 0 14px 30px -18px rgba(36,20,20,.42), 0 0 0 1px rgba(36,20,20,.05);
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px;
    margin-top: 36px; border: 1px solid var(--linea); border-radius: 28px; overflow: clip;
  }
  @media (min-width: 880px) { .altre-funzioni { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .cella {
    display: flex; flex-direction: column; min-width: 0;
    padding: 20px 18px 24px; background: var(--scheda); box-shadow: 0 0 0 1px var(--linea);
  }
  .cella-palco { position: relative; flex: 1 0 auto; min-height: 224px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; }
  .cella-testo { padding-top: 20px; max-width: 32em; }
  .cella-testo h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 5px; }
  .cella-testo p { font-size: 15px; line-height: 1.5; color: var(--tenue); }

  /* Aule e mappa del campus: i cubi lungo il ponte, il segnaposto che cade */
  .ca { position: relative; width: 100%; max-width: 330px; aspect-ratio: 315 / 253; }
  .ca-disegno { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .ca-terra { fill: rgba(228,217,215,.42); }
  .ca-su, .ca-ponte { fill: #FFFFFF; stroke: #DCCDCB; stroke-width: .8; stroke-linejoin: round; }
  .ca-sx { fill: #F4EDEB; stroke: #DCCDCB; stroke-width: .8; stroke-linejoin: round; }
  .ca-dx, .ca-ponte-lato { fill: #E9DFDD; stroke: #DCCDCB; stroke-width: .8; stroke-linejoin: round; }
  .ca-vetri { fill: none; stroke: #DDD0CE; stroke-width: .9; stroke-linecap: round; }
  .ca-cima { fill: var(--rosa); stroke: #E7B7B3; stroke-width: .8; stroke-linejoin: round; opacity: 0; transition: opacity .4s ease; }
  .ca-cima.accesa { opacity: 1; }
  .ca-pin { position: absolute; width: 24px; height: 30px; color: var(--primario); transform: translate(-50%, -100%); filter: drop-shadow(0 4px 3px rgba(106,12,12,.22)); }
  .ca-pin svg { display: block; width: 100%; height: 100%; }
  .ca-onda { position: absolute; width: 34px; height: 17px; margin: -8.5px 0 0 -17px; border-radius: 50%; border: 2px solid var(--primario); opacity: 0; }
  .ca-onda.va { animation: ca-onda .9s ease-out both; }
  @keyframes ca-onda { from { opacity: .7; transform: scale(.3); } to { opacity: 0; transform: scale(1.6); } }
  .ca-etichetta {
    position: absolute; z-index: 2; white-space: nowrap; padding: 8px 12px 9px; border-radius: 14px;
    background: var(--bianco); box-shadow: var(--ombra-mini); font-size: 12px; line-height: 1.3;
    transform: translate(calc(var(--ax, .5) * -100%), calc(-100% - 40px)); transform-origin: 50% 100%;
  }
  .ca-etichetta b { display: block; font-size: 13px; font-weight: 800; }
  .ca-etichetta span { display: block; font-weight: 600; color: var(--tenue); }
  .ca-pin.va { animation: ca-cade .55s cubic-bezier(.34,1.56,.64,1) both; }
  .ca-etichetta.va { animation: ca-appare .35s .33s ease-out both; }
  @keyframes ca-cade { from { opacity: 0; transform: translate(-50%, calc(-100% - 28px)); } }
  @keyframes ca-appare { from { opacity: 0; } }
  .ca-onda.va { animation-delay: .33s; }

  /* Lavoro ed eventi */
  .la { position: relative; width: 100%; max-width: 440px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 8px 0; overflow: clip; }
  .la-meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
  .la.animata::before, .la.animata::after { content: ''; position: absolute; z-index: 1; inset-block: 0; width: 24px; pointer-events: none; }
  .la.animata::before { left: 0; background: linear-gradient(90deg, var(--scheda), transparent); }
  .la.animata::after { right: 0; background: linear-gradient(270deg, var(--scheda), transparent); }
  .la.animata .la-fila { display: flex; width: max-content; animation: la-scorri 52s linear infinite paused; }
  .la.animata .la-meta { flex-wrap: nowrap; padding-right: 10px; }
  .la.animata .la-fila.inverso { animation: la-scorri 60s -21s linear infinite reverse paused; }
  .vivo .la.animata .la-fila { animation-play-state: running; }
  @keyframes la-scorri { to { transform: translateX(-50%); } }
  .la-chip {
    display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 17px 0 7px; white-space: nowrap;
    border-radius: var(--pillola); background: var(--bianco); box-shadow: 0 0 0 1px rgba(36,20,20,.05), 0 8px 18px -14px rgba(36,20,20,.4);
    font-size: 14.5px; font-weight: 800;
  }
  .la-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
  .la-ico svg { width: 16px; height: 16px; }
  .la-ico.lilla { background: var(--lilla); color: #5B3FA6; }
  .la-ico.celeste { background: var(--celeste); color: #1F4E8C; }
  .la-ico.giallo { background: var(--giallo); color: #7A5A00; }
  .la-ico.verde { background: var(--verde); color: #1C6B3C; }

  /* Benessere e supporto: un cerchio che respira piano e i servizi uno alla volta */
  .be { position: relative; width: 224px; height: 224px; display: grid; place-items: center; }
  .be-alone { position: absolute; inset: 0; border-radius: 50%; background: var(--lilla); opacity: .55; will-change: transform; animation: be-respira 5s ease-in-out infinite paused; }
  .be-alone.due { inset: 20px; opacity: 1; animation-delay: -.3s; }
  .be-nucleo { position: absolute; inset: 42px; border-radius: 50%; background: var(--bianco); box-shadow: 0 14px 30px -18px rgba(91,63,166,.5); animation: be-nucleo 5s ease-in-out infinite paused; }
  .vivo .be-alone, .vivo .be-nucleo { animation-play-state: running; }
  @keyframes be-respira { 0%, 100% { transform: scale(.8); } 50% { transform: scale(1); } }
  @keyframes be-nucleo { 0%, 100% { transform: scale(.94); } 50% { transform: scale(1); } }
  .be-servizi { position: relative; z-index: 1; width: 138px; height: 110px; margin: 0; padding: 0; list-style: none; }
  /* Il servizio vecchio sfuma via, poi arriva il nuovo: mai due scritte sovrapposte */
  .be-servizi li {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    opacity: 0; transform: translateY(-5px); transition: opacity .5s ease, transform .5s ease;
  }
  .be-servizi li.attuale { opacity: 1; transform: none; transition-duration: .8s; transition-delay: .5s; }
  .be-servizi b { font-size: 14.5px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
  .be-servizi small { margin-top: 4px; font-size: 12px; font-weight: 600; line-height: 1.3; color: #5B3FA6; }

  @media (prefers-reduced-motion: reduce) {
    .ca-pin.va, .ca-etichetta.va, .ca-onda.va, .la.animata .la-fila, .be-alone, .be-nucleo { animation: none; }
  }

  /* Privacy */
  .privacy-visivo { background: var(--bianco); border-radius: var(--raggio); padding: 20px 16px; margin-bottom: 18px; }
  .flusso { max-width: 760px; margin: 0 auto; }
  .flusso svg { width: 100%; height: auto; display: block; overflow: visible; }
  .flusso .nodo { font: 800 15px Manrope, sans-serif; fill: var(--testo); }
  .flusso .nodo-tenue { font: 800 15px Manrope, sans-serif; fill: var(--tenue); }
  .flusso .nodo-sotto { font: 600 12px Manrope, sans-serif; fill: var(--tenue); }
  .griglia-privacy { display: grid; gap: 14px; }
  @media (min-width: 700px) { .griglia-privacy { grid-template-columns: repeat(2, 1fr); } }
  .punto-privacy { background: var(--bianco); border-radius: 20px; padding: 22px; }
  .punto-privacy .icona-f { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--rosa); color: var(--primario); margin-bottom: 14px; }
  .punto-privacy .icona-f svg { width: 20px; height: 20px; }
  .punto-privacy h3 { font-size: 18px; margin-bottom: 6px; }
  .punto-privacy p { color: var(--tenue); font-size: 15px; }
  .interruttore { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--tenue); }
  .interruttore i { width: 42px; height: 26px; border-radius: 13px; background: var(--linea); position: relative; display: inline-block; flex: none; }
  .interruttore i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
  .interruttore.acceso i { background: var(--primario); }
  .interruttore.acceso i::after { left: 19px; }

  /* Domande frequenti: una chat che risponde con le domande frequenti */
  .solo-lettori { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .chat { max-width: 820px; margin: 0 auto; background: var(--bianco); border-radius: 30px; box-shadow: 0 30px 70px -36px rgba(36,20,20,.45), 0 0 0 1px rgba(36,20,20,.04); overflow: clip; display: flex; flex-direction: column; }
  .chat[hidden] { display: none; }
  .chat-testa { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--scheda); }
  .chat-testa .avatar, .msg .avatar { width: 40px; height: 40px; border-radius: 13px; background: var(--rosa); display: grid; place-items: center; flex: none; }
  .chat-testa .avatar .logo { width: 24px; height: 25px; }
  .chat-testa b { display: block; font-weight: 800; line-height: 1.2; }
  .chat-testa small { display: block; color: var(--tenue); font-size: 13px; font-weight: 600; }
  .chat-filo { padding: 22px 20px 6px; }
  .chat-messaggi { display: grid; gap: 18px; overflow-wrap: anywhere; }
  .chat-messaggi:focus-visible { outline-offset: 3px; }
  .msg { display: flex; gap: 12px; align-items: flex-start; }
  .msg .avatar { width: 32px; height: 32px; border-radius: 10px; }
  .msg .avatar .logo { width: 19px; height: 20px; }
  .msg.tu { justify-content: flex-end; }
  .msg.tu .testo { background: var(--testo); color: #fff; border-radius: 22px 22px 6px 22px; padding: 11px 17px; max-width: min(80%, 520px); font-weight: 600; font-size: 16px; line-height: 1.45; animation: msg-entra .3s ease both; }
  .msg.cubami .testo { padding-top: 4px; max-width: min(100%, 640px); font-size: 16px; line-height: 1.62; color: var(--testo); min-width: 0; }
  .msg.cubami .testo p + p { margin-top: 8px; }
  .msg.cubami .testo a { text-decoration: underline; text-underline-offset: 2px; }
  @keyframes msg-entra { from { opacity: 0; transform: translateY(8px); } }
  .msg.cubami .testo.scrive { position: relative; }
  .scrive .da-rivelare, .scrive .fonte { visibility: hidden; }
  .puntini { position: absolute; top: 12px; left: 0; display: flex; gap: 5px; }
  .puntini i { width: 8px; height: 8px; border-radius: 50%; background: #C9B1AF; animation: rimbalza 1.1s ease-in-out infinite; }
  .puntini i:nth-child(2) { animation-delay: .15s; }
  .puntini i:nth-child(3) { animation-delay: .3s; }
  @keyframes rimbalza { 0%, 70%, 100% { transform: none; opacity: .5; } 35% { transform: translateY(-5px); opacity: 1; } }
  .fonte { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 11px; border-radius: var(--pillola); background: var(--scheda); color: var(--tenue); font-size: 12.5px; font-weight: 700; }
  .fonte svg { width: 13px; height: 13px; }
  .suggerimenti { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 20px 12px; }
  .suggerimenti button {
    border: 1px solid var(--linea); background: var(--bianco); border-radius: var(--pillola); padding: 9px 15px; min-height: 42px;
    font: inherit; font-size: 14px; font-weight: 700; color: var(--testo); cursor: pointer; text-align: left; line-height: 1.3;
    transition: background .15s, border-color .15s, transform .15s;
  }
  .suggerimenti button:hover { background: var(--tinta); border-color: #EBC9C6; }
  .suggerimenti button:active { transform: scale(.98); }
  .suggerimenti button.altre { color: var(--primario); background: var(--scheda); border-color: transparent; }
  .chat-scrivi { display: flex; gap: 10px; align-items: center; padding: 12px 14px 8px; }
  .chat-scrivi input { flex: 1; min-width: 0; border: 1px solid var(--linea); border-radius: var(--pillola); padding: 0 20px; min-height: 54px; font: inherit; font-size: 16px; font-weight: 600; background: var(--scheda); color: var(--testo); transition: border-color .15s, background .15s; }
  .chat-scrivi input::placeholder { color: #9A8584; font-weight: 600; }
  .chat-scrivi input:focus { outline: none; border-color: var(--primario); background: #fff; }
  .chat-scrivi button { width: 54px; height: 54px; flex: none; border-radius: 50%; border: 0; background: var(--primario); color: #fff; display: grid; place-items: center; cursor: pointer; transition: opacity .15s, transform .15s; }
  .chat-scrivi button svg { width: 22px; height: 22px; }
  .chat-scrivi button[disabled] { opacity: .35; cursor: default; }
  .chat-scrivi button:not([disabled]):active { transform: scale(.94); }
  .chat-nota { font-size: 12.5px; color: var(--tenue); padding: 0 22px 16px; text-align: center; }
  @media (max-width: 520px) {
    .chat { border-radius: 22px; }
    .chat-filo { padding: 16px 14px 6px; }
    .suggerimenti { padding-inline: 14px; }
    .suggerimenti button { min-height: 44px; }
    .chat-scrivi input { padding-inline: 14px; }
    .chat-scrivi button { width: 48px; height: 48px; }
    .msg.cubami .testo { font-size: 15.5px; }
  }
  .chat-senza-js { max-width: 820px; margin: 0 auto; background: var(--bianco); border-radius: 20px; padding: 18px 22px; color: var(--tenue); }
  @media (prefers-reduced-motion: reduce) {
    .msg.tu .testo, .suggerimenti, .puntini i { animation: none; }
  }

  main, footer { position: relative; z-index: 1; }

  /* La privacy in un riquadro scuro: lo sfondo della pagina resta neutro */
  #privacy .pannello-scuro { background: var(--testo); color: #fff; border-radius: 32px; padding: 44px 18px 22px; }
  @media (min-width: 700px) { #privacy .pannello-scuro { padding: 64px 44px 40px; } }
  #privacy .intestazione p { color: #D9C9C9; }
  #privacy .punto-privacy { background: #2F1F1F; }
  #privacy .punto-privacy h3 { color: #fff; }
  #privacy .punto-privacy p { color: #CDBBBA; }
  #privacy .punto-privacy .icona-f { background: rgba(242,184,181,.14); color: #F2B8B5; }
  #privacy .interruttore { color: #CDBBBA; }
  #privacy .interruttore i { background: #4A3535; }
  #privacy .interruttore.acceso i { background: var(--primario-chiaro); }
  #privacy .privacy-cta { margin-top: 16px; max-width: 100%; background: var(--rosa); color: var(--testo); font-size: 15px; }
  #privacy .privacy-cta:hover { background: var(--bianco); }
  #privacy a:focus-visible { outline-color: #F2B8B5; }
  .nav { box-shadow: 0 14px 40px -12px rgba(36,20,20,.55), 0 0 0 1px rgba(255,255,255,.08); }

  /* Un alone rosa dietro il telefono da provare */
  .d-palco { position: relative; isolation: isolate; }
  .d-palco::before { content: ''; position: absolute; z-index: -1; left: 50%; top: 2%; width: min(150%, 620px); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(248,227,225,.95) 0%, rgba(248,227,225,.55) 38%, rgba(248,227,225,0) 68%); }
  .d-foglio:focus { outline: none; }

  /* Il campus disegnato a tratto nella chiusura: il ponte e i cubi */
  .chiusura { position: relative; overflow: hidden; padding-bottom: 0; }
  .campus { display: block; width: calc(100% + 48px); max-width: none; height: 150px; margin: 34px -24px 0; }
  .campus path, .campus line, .campus rect { fill: none; stroke: rgba(242,184,181,.5); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .campus .vetri { stroke: rgba(242,184,181,.22); stroke-width: 1.6; }
  .campus .ponte { stroke: rgba(242,184,181,.75); stroke-width: 2.8; }
  .campus .colle { stroke: rgba(242,184,181,.28); }
  html.anim .campus * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s cubic-bezier(.3,.1,.2,1); }
  html.anim .campus.disegnato * { stroke-dashoffset: 0; }
  @media (min-width: 640px) { .campus { height: auto; } }
  @media (min-width: 900px) { .chiusura { padding: 64px 48px 0; } .campus { width: calc(100% + 96px); margin: 44px -48px 0; } }

  /* Chiusura e footer */
  .chiusura { background: var(--testo); color: #fff; border-radius: 32px; padding: 48px 24px; text-align: center; margin-bottom: 20px; scroll-margin-top: 90px; }
  .chiusura .logo { width: 48px; height: 50px; margin: 0 auto 18px; }
  .chiusura h2 { margin-bottom: 10px; }
  .chiusura p { color: #d9c9c9; margin-bottom: 26px; }
  .chiusura p a { color: #fff; }
  .chiusura .store { justify-content: center; }
  footer { padding: 24px 0 110px; color: var(--tenue); font-size: 14px; }
  @media (min-width: 900px) { footer { padding-bottom: 48px; } }
  footer .riga-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; align-items: center; margin-bottom: 18px; }
  footer .marchio { display: inline-flex; align-items: center; gap: 8px; color: var(--testo); font-weight: 800; font-size: 18px; }
  footer .marchio .logo { width: 24px; height: 25px; }
  footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
  footer .non-ufficiale { background: var(--bianco); border-radius: 16px; padding: 16px 18px; font-weight: 600; }
  footer .non-ufficiale b { color: var(--testo); }

  /* Ogni sezione ha i suoi cubi, disegnati come il logo */
  .testata { display: flex; flex-direction: column; margin-bottom: 36px; }
  .testata > .intestazione { margin-bottom: 0; }
  .cubetti { order: -1; display: flex; justify-content: center; height: 120px; margin-bottom: 22px; pointer-events: none; }
  .cubetti svg { display: block; height: 100%; width: auto; max-width: 100%; overflow: visible; }
  .cubetti text { font-family: Manrope, system-ui, sans-serif; font-weight: 800; }
  @media (min-width: 900px) {
    .testata { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 48px; }
    .cubetti { order: 0; justify-content: flex-end; height: clamp(160px, 15vw, 200px); margin-bottom: 0; }
  }
  /* Il logo della chiusura resta della sua misura: le lastre arrivano da fuori e alla fine è uguale a prima */
  .chiusura .logo-montato { overflow: visible; }
  /* I link del piede: 40px da toccare, senza cambiare l'aspetto */
  footer nav a, footer .marchio { display: inline-flex; align-items: center; min-height: 40px; }
  footer nav { row-gap: 0; }
  @media (width < 900px) {
    body { overflow-x: clip; }
    .contenitore { padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right)); }
    .nav {
      position: sticky; top: max(8px, env(safe-area-inset-top)); left: auto; bottom: auto;
      width: min(480px, calc(100% - 36px)); margin: max(8px, env(safe-area-inset-top)) auto 0;
      transform: none;
    }
    .nav a { display: grid; flex: 1; min-height: 44px; padding: 0 8px; place-items: center; }
    section { padding: 48px 0; scroll-margin-top: calc(64px + env(safe-area-inset-top)); }
    .hero { padding: 30px 0 22px; overflow-x: clip; overflow-y: visible; }
    .hero .contenitore { gap: 24px; }
    .hero-visivo { --P: var(--telefono-mobile); padding-block: 12px; }
    .hero-lancio-mobile { display: grid; justify-items: center; gap: 12px; }
    .hero-lancio-mobile .in-arrivo {
      padding: 16px 22px;
      border-radius: 24px; text-align: center;
    }
    .hero-lancio-mobile .in-arrivo .icone { display: none; }
    .hero-loghi { display: flex; align-items: center; justify-content: center; gap: 14px; }
    .hero-loghi img { display: block; }
    .hero-lancio-mobile .store { justify-content: center; }
    .testata { position: relative; margin-bottom: 24px; }
    .testata h2 { min-height: 62px; display: flex; align-items: center; margin: 0 82px 8px 0; }
    .testata p { font-size: 16px; }
    .cubetti { position: absolute; top: 0; right: 0; width: 70px; height: 62px; margin: 0; }

    .demo { max-width: 460px; margin-inline: auto; }
    .d-voci { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .d-voce { flex-direction: column; justify-content: center; gap: 3px; padding: 4px 2px; min-height: 46px; border-radius: 12px; text-align: center; }
    .d-voci .d-icona { width: 22px; height: 22px; }
    .d-voci .d-icona svg { width: 13px; height: 13px; }
    .d-titolo { display: none; }
    .d-titolo-breve { display: block; font-size: 11px; font-weight: 800; }
    .d-nota { display: none; }
    .d-pagine { display: flex; align-items: center; gap: 6px; }
    .d-pagine[hidden] { visibility: hidden; }
    .d-pagine button { background: var(--bianco); color: var(--testo); border: 1px solid var(--linea); border-radius: var(--pillola); min-height: 44px; padding-inline: 12px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
    .d-pagine button:disabled { opacity: .45; cursor: default; }
    .d-chips { flex-wrap: wrap; }
    .d-telefono { width: var(--telefono-mobile); padding: 7px; border-radius: 34px; }
    .d-telefono::before { top: 17px; height: 17px; pointer-events: none; }
    .d-schermo {
      border-radius: 28px; overflow: clip; font-size: max(11px, 4.3cqw);
      scroll-margin-top: calc(72px + env(safe-area-inset-top));
    }
    .d-vista { bottom: 22cqw; overflow: hidden; padding: 17cqw 5cqw 2cqw; }
    .d-vista.senza-nav { bottom: 0; padding-bottom: 5cqw; }
    .d-nav { height: 16.5cqw; }
    .d-nav.nascosta, .d-schermo.foglio-aperto :is(.d-vista, .d-nav), .d-velo { display: none; }
    .d-fisso { position: static; }
    .d-foglio, .d-foglio.dialogo {
      position: absolute; inset: 0; max-height: none; overflow: hidden;
      padding: 17cqw 5cqw 6cqw; border-radius: 0; transform: none; animation: d-sfuma .25s ease both;
    }
    .d-foglio::before { display: none; }
    .d-foglio button.d-foglio-chiudi { display: inline-flex; min-height: 44px; margin-bottom: 12px; }
    .d-toast, .d-banner { top: var(--d-messaggio-top, 12cqw); bottom: auto; height: max-content; }
    .d-toast.alto { bottom: auto; }
    .d-banner { opacity: 0; }
    .d-banner.visibile { opacity: 1; }
    .d-campo, .d-due > * { min-width: 0; }
    label.d-campo { display: block; }
    .d-campo input, .d-campo select { min-height: 44px; }
    .d-esami-scelta { display: none; }
    .d-esame-select { display: block; }

    .simulatore { display: none; }
    .sim-esempio { display: grid; gap: 8px; padding: 16px; }
    .sim-esempio p { font-size: 14px; color: var(--tenue); }
    .sim-esempio .medie { margin: 0; }
    .sim-esempio-voti { margin-bottom: 4px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #media .testata p { display: none; }
    #privacy .cubetti, #privacy .griglia-privacy { display: none; }
    #privacy .testata h2 { min-height: 0; margin-right: 0; }
    #privacy .privacy-visivo { margin: 0; padding: 6px 2px; }
    #privacy .flusso .nodo, #privacy .flusso .nodo-tenue { font-size: 24px; }
    #privacy .flusso .nodo-sotto { font-size: 20px; }
    .chat-testa { padding: 10px 14px; }
    .chat-testa .avatar { width: 30px; height: 30px; }
    .chat-testa .avatar .logo { width: 19px; height: 20px; }
    .chat-messaggi { gap: 10px; }
    .msg.cubami .testo, .msg.tu .testo { font-size: 14px; }
    .suggerimenti:not(.tutte) button:nth-child(n+3):not(.altre) { display: none; }
    .pannello { padding: 18px 16px; }
    .medie { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .media { padding-inline: 4px; }
    .altre-funzioni { margin-top: 24px; }
    .cella-palco { min-height: 178px; }
    .cella-lavoro .cella-palco { min-height: 136px; }
    .ca { max-width: 280px; }
    .be { width: 188px; height: 188px; }
    .be-alone.due { inset: 14px; }
    .be-nucleo { inset: 27px; }
    .cella-testo { padding-top: 12px; }
    #privacy .pannello-scuro { padding: 24px 14px 20px; }
    .chiusura { padding-top: 32px; }
    footer { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
  }
  @media (max-width: 430px) {
    .scelte.voti { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .notifica.n1 { left: -9px; }
    .notifica.n3 { left: 6px; }
  }
  @media (min-width: 900px) { .cella-palco { flex: 0 0 266px; } }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
  }
