/* Pannello Camaleontico — foglio dal basso su mobile, colonna a destra su desktop */
#pannello { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: var(--bianco); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 40px rgba(30, 50, 80, .16), 0 0 0 1px var(--blu-06);
  display: flex; flex-direction: column; height: var(--h, 46vh); max-height: calc(100dvh - 60px - var(--sa-t)); transition: height .42s var(--dolce), opacity .6s ease, transform .7s var(--dolce); will-change: height; }
#pannello.trascina { transition: none; }
#pannello[data-stato="ridotto"] { --h: calc(150px + var(--sa-b)); }
#pannello[data-stato="medio"] { --h: 46dvh; }
#pannello[data-stato="esteso"] { --h: calc(100dvh - 66px - var(--sa-t)); }
#pannello[data-stato="ingresso"] { height: auto; }
body.avvio #pannello { transform: translateY(24px); }
#maniglia { flex: none; height: 22px; display: grid; place-items: center; touch-action: none; cursor: grab; }
#maniglia span { width: 38px; height: 4px; border-radius: 2px; background: var(--blu-12); }
#pannello[data-stato="ingresso"] #maniglia { visibility: hidden; height: 12px; }
#pannello-testa { flex: none; padding: 0 16px 10px; touch-action: none; }
#pannello-corpo { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 2px 16px calc(22px + var(--sa-b)); outline: none; }
#pannello[data-stato="ridotto"] #pannello-corpo { overflow: hidden; }
#pannello[data-stato="ingresso"] #pannello-corpo { padding-bottom: calc(18px + var(--sa-b)); flex: none; }

.frase { font-family: "Prata", serif; font-size: clamp(25px, 6.6vw, 32px); line-height: 1.16; text-align: center; padding: 4px 8px 16px; color: var(--blu); }
body.avvio .frase, body.avvio .cerca-riga { opacity: 0; transform: translateY(8px); }
.frase, .cerca-riga { transition: opacity .7s ease, transform .8s var(--dolce); }
body.passo-3 .frase, body.passo-4 .cerca-riga { opacity: 1; transform: none; }

.cerca-riga { display: flex; align-items: center; gap: 8px; }
.cerca { flex: 1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 24px; background: var(--blu-06); box-shadow: inset 0 0 0 1px var(--blu-06); }
.cerca:focus-within { background: #fff; box-shadow: inset 0 0 0 1.5px var(--oro); }
.cerca svg { width: 18px; height: 18px; flex: none; color: var(--blu-50); }
.cerca input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.cerca input::placeholder { color: var(--blu-50); }
.cerca .x { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--blu-50); }

.briciole { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; font-size: 12.5px; color: var(--blu-50); margin: 4px 0 6px; }
.briciole button { padding: 4px 2px; color: var(--blu-70); font-weight: 500; }
.briciole button:hover { color: var(--oro-scuro); }
.briciole .sep { opacity: .5; }
.briciole .indietro { width: 30px; height: 30px; margin-right: 4px; border-radius: 50%; background: var(--blu-06); display: grid; place-items: center; padding: 0; }
.briciole .indietro svg { width: 16px; height: 16px; }
.sopra { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--oro-scuro); margin-bottom: 2px; }
.titolo { font-family: "Prata", serif; font-size: 30px; line-height: 1.12; margin: 0 0 4px; }
.titolo.piccolo { font-size: 24px; }
.motto { font-size: 15px; color: var(--blu-70); margin-bottom: 10px; }
.intro { font-size: 15.5px; line-height: 1.55; margin: 8px 0 14px; }
.sezione { margin: 20px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blu-50); display: flex; justify-content: space-between; align-items: center; }
.vuoto { font-size: 14.5px; color: var(--blu-70); padding: 12px 14px; border-radius: 14px; background: var(--blu-06); margin: 10px 0; }

.guardi { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--oro-14); font-size: 14px; margin: 4px 0 12px; animation: su .35s var(--dolce) both; }
.guardi b { font-weight: 600; }
.guardi button { flex: none; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 14px; background: #fff; }

.temi { display: flex; gap: 8px; overflow-x: auto; margin: 4px -16px 6px; padding: 4px 16px 8px; scrollbar-width: none; }
.temi::-webkit-scrollbar { display: none; }
.tema { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; font-weight: 500; background: #fff; box-shadow: inset 0 0 0 1px var(--blu-12); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tema small { font-size: 11.5px; color: var(--blu-50); font-weight: 500; }
.tema[aria-pressed="true"] { background: var(--blu); color: #fff; box-shadow: none; }
.tema[aria-pressed="true"] small { color: rgba(255, 255, 255, .7); }

.lista { display: flex; flex-direction: column; }
.voce-lista { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--blu-06); width: 100%; }
.voce-lista:last-child { border-bottom: 0; }
.voce-lista .ico { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--blu-06); display: grid; place-items: center; color: var(--blu); }
.voce-lista .ico svg { width: 19px; height: 19px; }
.voce-lista .ico.oro { background: var(--oro-14); color: var(--oro-scuro); }
.voce-lista .tx { flex: 1; min-width: 0; }
.voce-lista .n, .voce-lista .s { display: block; }
.voce-lista .tx { text-align: left; }
.voce-lista .etichetta { flex: none; margin-left: 0; }
.voce-lista .n { font-weight: 500; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voce-lista .s { font-size: 13px; color: var(--blu-50); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voce-lista .fr { flex: none; color: var(--blu-50); }
.voce-lista .fr svg { width: 16px; height: 16px; }
.griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tessera { padding: 12px 12px 11px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--blu-12); min-height: 62px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.tessera .n { font-family: "Prata", serif; font-size: 16px; line-height: 1.2; }
.tessera .s { font-size: 12px; color: var(--blu-50); }
.tessera.spenta { box-shadow: inset 0 0 0 1px var(--blu-06); }
.tessera.spenta .n { font-family: "DM Sans", sans-serif; font-size: 14px; color: var(--blu-70); }

.etichetta { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; font-size: 10px; font-weight: 600; letter-spacing: .1em; vertical-align: middle; margin-left: 6px; }
.etichetta.demo { background: var(--oro-14); color: var(--oro-scuro); }
.etichetta.vds { background: var(--blu); color: #fff; }
.etichetta.bozza { background: var(--blu-06); color: var(--blu-70); }
.etichetta.sim { background: #fff; color: var(--blu-70); box-shadow: inset 0 0 0 1px var(--blu-12); }

.citazione { font-family: "Prata", serif; font-size: 19px; line-height: 1.45; padding: 4px 0 4px 16px; border-left: 2px solid var(--oro); margin: 12px 0 10px; }
.scheda-dati { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; margin: 4px 0; }
.scheda-dati dt { color: var(--blu-50); }
.scheda-dati dd { margin: 0; }
.nota { font-size: 12.5px; color: var(--blu-50); margin: 8px 0; line-height: 1.45; }

.azioni { display: flex; gap: 8px; margin: 16px 0 6px; flex-wrap: wrap; }
.btn { height: 46px; padding: 0 18px; border-radius: 23px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn svg { width: 18px; height: 18px; }
.btn.primo { background: var(--blu); color: #fff; flex: 1; }
.btn.primo[aria-pressed="true"] { background: var(--oro); }
.btn.secondo { box-shadow: inset 0 0 0 1.5px var(--blu-12); }
.btn.testo { height: 40px; padding: 0 4px; color: var(--oro-scuro); font-size: 14.5px; }
.btn.piccolo { height: 36px; font-size: 13.5px; padding: 0 14px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.inviti { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--blu-06); display: flex; flex-direction: column; align-items: flex-start; }

.schede { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--blu-06); margin: 8px 0 14px; }
.schede button { flex: 1; height: 38px; border-radius: 12px; font-size: 13.5px; font-weight: 500; text-align: center; color: var(--blu-70); }
.schede button[aria-selected="true"] { background: #fff; color: var(--blu); box-shadow: 0 1px 6px rgba(30, 50, 80, .12); font-weight: 600; }
.campo { display: block; margin: 12px 0; }
.campo span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blu-50); margin-bottom: 6px; }
.campo input, .campo textarea, .campo select { width: 100%; border: 0; border-radius: 12px; background: var(--blu-06); padding: 12px 14px; font-size: 16px; outline: 0; resize: vertical; }
.campo input:focus, .campo textarea:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--oro); }
.modi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.modi button { padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--blu-12); font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.modi button svg { width: 18px; height: 18px; flex: none; }
.modi button[aria-pressed="true"] { background: var(--blu); color: #fff; box-shadow: none; }
.ancore { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--oro-14); margin: 10px 0; }
.riga-fine { display: flex; gap: 8px; align-items: center; }
#pannello-corpo.in-volo .dopo { opacity: 0; }
#pannello-corpo.arrivo .dopo > * { animation: su .5s var(--dolce) both; }
#pannello-corpo.arrivo .dopo > *:nth-child(2) { animation-delay: .06s; } #pannello-corpo.arrivo .dopo > *:nth-child(3) { animation-delay: .12s; }
#pannello-corpo.arrivo .dopo > *:nth-child(4) { animation-delay: .18s; } #pannello-corpo.arrivo .dopo > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes su { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  #pannello { left: auto; top: 0; bottom: 0; width: var(--pannello-l); height: auto !important; max-height: none; border-radius: 0; box-shadow: -8px 0 40px rgba(30, 50, 80, .10), 0 0 0 1px var(--blu-06); }
  #pannello[data-stato="ingresso"] { height: auto; justify-content: center; }
  #pannello[data-stato="ingresso"] #pannello-corpo { flex: none; }
  #pannello[data-stato="ridotto"] #pannello-corpo { overflow-y: auto; }
  #maniglia { display: none; }
  #pannello-testa { padding: 20px 26px 12px; }
  #pannello-corpo { padding: 2px 26px 30px; }
  .temi { margin: 4px -26px 6px; padding: 4px 26px 8px; flex-wrap: wrap; overflow: visible; }
  .frase { font-size: 34px; text-align: left; padding: 0 0 20px; }
  body.avvio #pannello { transform: translateX(24px); }
}
