/* YouppyTravel. Base e schema Office di YouppyStudy (stessi pezzi e misure); colori del viaggio: accento azzurro mare #0b93c9. */
[data-tema="chiaro"] {
  --sfondo: #f2f6f8; --carta: #ffffff; --testo: #142028; --tenue: #66737c; --linea: #dde6eb;
  --accento: #0b93c9; --accento-forte: #0779a8; --su-accento: #ffffff; --accento-tenue: #dcf0f9;
  --rosso: #d8392f; --verde: #1a9d55; --blu: #2f6bd8; --sole: #f2a516;
  --ombra: 0 2px 14px rgba(10, 60, 90, .08); --campo: #eaf0f3;
}
[data-tema="scuro"] {
  --sfondo: #121a20; --carta: #1b252d; --testo: #ebf2f6; --tenue: #93a3ae; --linea: #2a3842;
  --accento: #3cc2f0; --accento-forte: #6fd3f5; --su-accento: #06202c; --accento-tenue: #12313f;
  --rosso: #ff6b60; --verde: #45d08f; --blu: #7d9bff; --sole: #ffc04d;
  --ombra: 0 2px 14px rgba(0, 0, 0, .4); --campo: #24313b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--sfondo); color: var(--testo); font: 16px/1.45 system-ui, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--blu); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
[hidden] { display: none !important; }

#app { height: 100dvh; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; background: var(--sfondo); position: relative; overflow: hidden; }
#vista { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }

/* ---- barra in basso (schema Office) ---- */
#barra { display: flex; justify-content: space-around; align-items: flex-end; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--carta); border-top: 1px solid var(--linea); z-index: 2; }
#barra > button, #barra > a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0 3px; color: var(--tenue); font-size: 11px; font-weight: 600; border-radius: 14px; text-decoration: none; min-width: 0; }
#barra > .attiva { color: var(--accento-forte); }
#barra .ic { width: 44px; height: 27px; padding: 3px 11px; border-radius: 12px; transition: background .2s; }
#barra .attiva .ic { background: var(--accento-tenue); }
#barra svg { width: 100%; height: 100%; display: block; }
#barra button.piu { flex: 0 0 58px; width: 58px; height: 58px; margin: -20px 6px 0; padding: 0; border-radius: 50%; display: grid; place-items: center; color: var(--su-accento);
  background: linear-gradient(135deg, var(--accento), var(--accento-forte)); box-shadow: 0 6px 18px color-mix(in srgb, var(--accento) 50%, transparent); transition: transform .1s; }
#barra button.piu:active { transform: scale(.92); }
#barra button.piu:disabled { opacity: .45; }
#barra button.piu svg { width: 28px; height: 28px; }

/* ---- pezzi comuni ---- */
@font-face { font-family: "Baloo 2"; src: url("/caratteri/Baloo2.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
.pagina { padding: calc(14px + env(safe-area-inset-top)) 16px 26px; display: flex; flex-direction: column; gap: 14px; }
.testata { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.testata h1 { flex: 1; min-width: 0; font-family: "Baloo 2", system-ui, sans-serif; font-size: clamp(24px, 7.5vw, 29px); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.testata h1 b { color: var(--accento-forte); }
.tondo { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--tenue); background: var(--carta); box-shadow: var(--ombra); transition: transform .1s; }
.tondo:active { transform: scale(.92); }
.tondo.pieno { background: var(--accento); color: var(--su-accento); box-shadow: 0 6px 16px color-mix(in srgb, var(--accento) 45%, transparent); }
.tondo svg { width: 22px; height: 22px; }
.carta { background: var(--carta); border-radius: 20px; padding: 16px; box-shadow: var(--ombra); }
.nota { color: var(--tenue); font-size: 14px; }
.nota.centro { text-align: center; }
.nota.avviso { background: color-mix(in srgb, var(--sole) 18%, transparent); color: var(--testo); padding: 10px 12px; border-radius: 12px; }
.bottone { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 15px; background: var(--accento); color: var(--su-accento); font-weight: 700; font-size: 16px; text-decoration: none; transition: transform .1s; white-space: nowrap; }
.bottone:active { transform: scale(.97); }
.bottone:disabled { opacity: .45; transform: none; }
.bottone.secondario { background: var(--accento-tenue); color: var(--accento-forte); }
.bottone.chiaro { background: var(--campo); color: var(--testo); }
.bottone.pericolo { background: none; color: var(--rosso); }
.bottone.rosso { background: var(--rosso); color: #fff; }
.bottone.largo { width: 100%; }
.bottone svg { width: 19px; height: 19px; flex: none; }
.bottone.voce { justify-content: flex-start; }
.pillola { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 11px; border-radius: 999px; background: var(--campo); color: var(--tenue); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.pillola.forte { background: var(--accento-tenue); color: var(--accento-forte); }
.pillola svg { width: 14px; height: 14px; }
.vuoto { text-align: center; padding: 34px 20px; color: var(--tenue); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vuoto > svg { width: 50px; height: 50px; color: var(--linea); }
.vuoto h3 { color: var(--testo); font-size: 18px; font-weight: 800; }
.campo { width: 100%; background: var(--campo); border: 1px solid transparent; border-radius: 14px; padding: 12px 14px; font-size: 16px; min-width: 0; }
.campo:focus { border-color: var(--accento); outline: none; background: var(--carta); }
.campo.piccolo { padding: 9px 10px; font-size: 15px; border-radius: 12px; }
textarea.campo { resize: vertical; line-height: 1.5; }
.etichetta { display: block; font-size: 13px; font-weight: 700; color: var(--tenue); margin: 2px 2px 6px; }
.titoletto { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.titoletto small { color: var(--tenue); font-weight: 700; font-size: 13px; background: var(--campo); border-radius: 999px; padding: 1px 8px; }
.punto { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; flex: none; }
/* ⓘ: la spiegazione si apre sotto, al tocco */
.ib { width: 24px; height: 24px; display: inline-grid; place-items: center; color: var(--tenue); flex: none; border-radius: 50%; vertical-align: middle; }
.ib svg { width: 18px; height: 18px; }
.ib[aria-expanded="true"] { color: var(--accento-forte); }
.infoTesto { flex-basis: 100%; font-weight: 400; font-size: 13.5px; background: var(--campo); border-radius: 12px; padding: 9px 11px; margin: 4px 0 6px; }
h3 .infoTesto, .titoletto .infoTesto { order: 9; }
.titoletto, .iaBox h3, .carta.eta h3 { flex-wrap: wrap; }

/* ---- sezioni e ricerca (schema Office) ---- */
.sotto-nav { display: flex; flex-direction: column; gap: 10px; }
.sezioni { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.sezioni::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--campo); color: var(--tenue); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.chip svg { width: 16px; height: 16px; }
.chip.on { background: var(--accento-tenue); color: var(--accento-forte); }
.ricerca { display: flex; gap: 8px; align-items: center; }
.ricerca .campo { flex: 1; }
.filtroAttivo { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--tenue); }

/* ---- entrata ---- */
.benvenuto { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 18px; }
.benvenuto > svg { width: 54px; height: 54px; color: var(--accento); }
.benvenuto h3 { font-size: 20px; }
.carta.eta { display: flex; flex-direction: column; gap: 8px; }
.carta.eta h3 { display: flex; align-items: center; gap: 6px; font-size: 18px; margin-bottom: 4px; }

/* ---- feed: i viaggi come post ---- */
.feed { display: flex; flex-direction: column; gap: 16px; }
.post { background: var(--carta); border-radius: 22px; box-shadow: var(--ombra); overflow: hidden; display: flex; flex-direction: column; }
.postTesta { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.postTesta .chi { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.postTesta .chi b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.postTesta .chi small { color: var(--tenue); font-size: 12.5px; }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accento); color: var(--su-accento); font-weight: 800; font-size: 22px; }
.avatar.piccolo { width: 36px; height: 36px; font-size: 16px; }
.avatar.mini { width: 24px; height: 24px; font-size: 12px; }
.mediaBox { position: relative; }
.nastro { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #0c1217; }
.nastro::-webkit-scrollbar { display: none; }
.fotogramma { position: relative; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 5; max-height: 62dvh; }
.nastro.grande .fotogramma { aspect-ratio: 4 / 4.2; }
.fotogramma img, .fotogramma video { width: 100%; height: 100%; object-fit: cover; display: block; }
.inRevisione { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.puntini { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.puntini i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.puntini i.on { background: #fff; }
.copertina { aspect-ratio: 400 / 260; background: radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--accento) 30%, var(--carta)), var(--accento-tenue) 70%); }
.rottaSvg { width: 100%; height: 100%; display: block; }
.rottaLinea { fill: none; stroke: var(--accento-forte); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 2 9; }
.rottaPunto { fill: var(--carta); stroke: var(--accento-forte); stroke-width: 3.5; }
.rottaNome { font: 700 13px system-ui, sans-serif; fill: var(--testo); text-anchor: middle; paint-order: stroke; stroke: var(--carta); stroke-width: 4px; }
.postCorpo { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px 4px; width: 100%; }
.postCorpo h3 { font-size: 18px; font-weight: 800; }
.riga2 { display: flex; align-items: center; gap: 7px; color: var(--tenue); font-size: 13.5px; flex-wrap: wrap; }
.riga2 > svg { width: 16px; height: 16px; flex: none; }
.tappeChip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tchip { background: var(--campo); border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.freccia { color: var(--tenue); font-size: 13px; }
.posti { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px; padding: 8px 14px 0; font-size: 13px; color: var(--tenue); }
.posti b { color: var(--accento-forte); font-size: 13px; }
.postiBarra { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--campo); overflow: hidden; }
.postiBarra i { display: block; height: 100%; background: var(--accento); border-radius: 3px; }
.postAzioni { display: flex; gap: 8px; padding: 12px 14px 14px; align-items: center; }
.postAzioni .bottone { flex: 1; min-width: 0; }
.postAzioni .tondo { box-shadow: none; background: var(--campo); }

/* ---- scheda del viaggio ---- */
.pagina > .mediaBox, .pagina > .nastro, .pagina > .copertina { margin: 0 -16px; }
.schedaTesta { display: flex; flex-direction: column; gap: 8px; }
.schedaTesta h2 { font-family: "Baloo 2", system-ui, sans-serif; font-size: 26px; font-weight: 800; line-height: 1.1; }
.schedaTesta .posti { padding: 4px 0 0; }
.fatti { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.fatti span { display: inline-flex; align-items: center; gap: 6px; }
.fatti svg { width: 17px; height: 17px; color: var(--accento-forte); }
.azioniScheda { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.azioniScheda .bottone { min-width: 0; padding: 6px 10px; font-size: 14.5px; white-space: normal; line-height: 1.2; text-align: center; }
.azioniScheda .bottone:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.testoLungo { white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.mappaScheda { height: 260px; border-radius: 16px; overflow: hidden; margin-bottom: 12px; position: relative; background: var(--campo); }
.mappaScheda.piccola { height: 210px; margin: 10px 0 0; }
.mappaGrande { height: calc(100dvh - 300px); min-height: 320px; border-radius: 20px; overflow: hidden; position: relative; background: var(--campo); }
.tappe { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.tappe li { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 12px; }
.tappe li:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; border-left: 2px dashed var(--linea); }
.tappe .num { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accento); color: var(--su-accento); font-weight: 800; font-size: 13px; }
.tappe li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tappe small { color: var(--tenue); font-size: 13px; }
.personeChip { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--campo); font-size: 14px; font-weight: 600; }
.pchip.org { background: var(--accento-tenue); color: var(--accento-forte); }
.pchip .togli { width: 22px; height: 22px; display: grid; place-items: center; color: var(--tenue); }
.pchip .togli svg { width: 14px; height: 14px; }
.domanda { border-top: 1px solid var(--linea); padding: 10px 0 2px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; word-break: break-word; }
.domanda .risposta { background: var(--accento-tenue); border-radius: 12px; padding: 8px 10px; }
#domande .ricerca { margin-bottom: 4px; }

/* ---- pin delle mappe ---- */
.tappaPin { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accento); color: var(--su-accento); font: 800 13px system-ui, sans-serif; border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.viaggioPin { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accento); color: var(--su-accento); border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35); cursor: pointer; }
.viaggioPin svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* il pulsante dei temi della mappa (come YouppyMaps, dentro la mappa) */
.temaMappa { position: absolute; right: 10px; top: 10px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.temaMappa .fab { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--carta) 88%, transparent); border: 1px solid var(--linea); box-shadow: var(--ombra); backdrop-filter: blur(10px); }
.temaMappa .fab svg { width: 20px; height: 20px; fill: none; stroke: var(--testo); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.temaMappa .fab.on svg { stroke: var(--accento); }
.temaMenu { width: 196px; background: var(--carta); border: 1px solid var(--linea); border-radius: 16px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-height: 70%; overflow-y: auto; }
.temaMenu .tit { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--tenue); padding: 6px 8px 4px; }
.temaMenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 10px; text-align: left; font-size: 14.5px; color: var(--testo); }
.temaMenu button.sel { background: var(--accento-tenue); color: var(--accento-forte); font-weight: 700; }
.temaMenu .prev { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(127,127,127,.3); }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* ---- modulo: crea / modifica ---- */
.sezMod { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; min-width: 0; }
.sezMod > .titoletto { margin-bottom: 0; font-size: 14px; color: var(--tenue); }
.mediaRiga { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.miniMedia { position: relative; flex: none; width: 84px; height: 104px; border-radius: 14px; overflow: hidden; background: var(--campo); display: grid; place-items: center; color: var(--tenue); }
.miniMedia img { width: 100%; height: 100%; object-fit: cover; }
.miniMedia.aggiungi { border: 2px dashed var(--linea); display: flex; flex-direction: column; gap: 2px; }
.miniMedia.aggiungi svg { width: 24px; height: 24px; }
.miniMedia.aggiungi small { font-size: 12px; font-weight: 700; }
.miniMedia .togli { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.miniMedia .togli svg { width: 14px; height: 14px; }
.miniMedia .tipoV { position: absolute; left: 5px; bottom: 5px; color: #fff; width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.risultati { display: flex; flex-direction: column; }
.risultato { display: flex; align-items: center; gap: 10px; padding: 9px 6px; text-align: left; border-bottom: 1px solid var(--linea); min-width: 0; }
.risultato svg { width: 18px; height: 18px; color: var(--accento-forte); flex: none; }
.risultato span { display: flex; flex-direction: column; min-width: 0; }
.risultato small { color: var(--tenue); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tappe.modifica { margin-top: 6px; }
.tappe.modifica li { padding-bottom: 10px; align-items: center; }
.tCorpo { gap: 6px; }
.tRiga { display: flex; align-items: center; gap: 6px; }
.tNome { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tNome b, .tNome small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dateT { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dateT .campo { flex: 1; min-width: 0; }
.dateT > span { color: var(--tenue); flex: none; }
.mini { width: 30px; height: 30px; border-radius: 10px; background: var(--campo); display: grid; place-items: center; color: var(--tenue); }
.mini svg { width: 16px; height: 16px; }
.mini:disabled { opacity: .35; }
.dueCampi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.dueCampi .bottone { min-width: 0; }

/* ---- unisciti ---- */
.riassunto { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.foglio .posti { padding: 6px 0 10px; }
.spunta { display: flex; align-items: center; gap: 10px; font-size: 14.5px; padding: 12px 2px; cursor: pointer; }
.spunta input { width: 22px; height: 22px; accent-color: var(--accento); flex: none; }

/* ---- elenchi: i miei, persone ---- */
.elenco { display: flex; flex-direction: column; gap: 10px; }
.blocco { display: flex; flex-direction: column; }
.rigaV, .persona { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--carta); border-radius: 16px; padding: 10px 12px; box-shadow: var(--ombra); }
.rigaV img, .bollo { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: cover; display: grid; place-items: center; background: var(--accento-tenue); color: var(--accento-forte); }
.bollo svg { width: 22px; height: 22px; }
.rigaV .cuore, .persona .cuore { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rigaV b, .persona b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rigaV small, .persona small { color: var(--tenue); font-size: 13px; }
.rigaV > svg.giraDx { width: 18px; height: 18px; transform: rotate(180deg); color: var(--tenue); flex: none; }
.persona .bottone { min-height: 40px; padding: 0 12px; font-size: 14px; }
.persona .tondo { box-shadow: none; background: var(--campo); width: 38px; height: 38px; }
.segmento { display: flex; background: var(--campo); border-radius: 14px; padding: 3px; gap: 3px; margin-top: 8px; }
.segmento button { flex: 1; padding: 8px 0; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--tenue); }
.segmento button.on { background: var(--carta); color: var(--testo); box-shadow: var(--ombra); }

/* ---- chat e barra laterale dell'IA (schema Office) ---- */
.chatCorpo { display: flex; gap: 10px; align-items: flex-start; }
.cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cbarra { display: flex; flex-direction: column; gap: 6px; flex: none; position: sticky; top: 8px; }
.cb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 54px; min-height: 52px; border-radius: 16px; background: var(--carta); box-shadow: var(--ombra); color: var(--tenue); }
.cb svg { width: 21px; height: 21px; } .cb small { font-size: 10px; font-weight: 700; }
.chatCorpo[data-barra="sinistra"] .cbarra { order: -1; }
.chatCorpo[data-barra="destra"] .cbarra { order: 1; }
.chatCorpo[data-barra="su"] { flex-direction: column; }
.chatCorpo[data-barra="su"] .cbarra { flex-direction: row; overflow-x: auto; position: static; width: 100%; scrollbar-width: none; }
.chatCorpo[data-barra="su"] .cmain { width: 100%; }
.chatCorpo[data-barra="su"] .cmain { display: contents; }
.chatCorpo[data-barra="su"] .cmain > * { width: 100%; box-sizing: border-box; min-width: 0; order: 2; }
.chatCorpo[data-barra="su"] .cmain > .iaBox { order: 0; }
.chatCorpo[data-barra="su"] .cbarra { order: 1; }
.chatCorpo[data-barra="nessuna"] .cbarra { display: none; }
.iaBox, .chatCarta { display: flex; flex-direction: column; gap: 10px; }
.iaBox h3, .chatCarta h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.iaBox h3 > svg, .chatCarta h3 > svg { width: 20px; height: 20px; color: var(--accento-forte); }
.iaRis:empty { display: none; }
.iaTestoRis { white-space: pre-wrap; word-break: break-word; line-height: 1.5; background: var(--campo); border-radius: 14px; padding: 12px 14px; }
.bozza { background: var(--campo); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.ycBox { height: 440px; min-height: 360px; border-radius: 14px; overflow: hidden; }
.anteprimaMedia { width: 100%; max-height: 50dvh; object-fit: contain; border-radius: 14px; background: var(--campo); display: block; }

/* ---- profilo ---- */
.profiloTesta { display: flex; gap: 14px; align-items: center; }
.profiloTesta h3 { font-size: 19px; }
.statline { display: flex; gap: 10px; }
.statline:empty { display: none; }
.statbox { flex: 1; background: var(--carta); border-radius: 16px; padding: 12px; text-align: center; box-shadow: var(--ombra); }
.statbox .n { font-size: 24px; font-weight: 800; line-height: 1; }
.statbox .e { font-size: 12px; color: var(--tenue); margin-top: 4px; }
.carta.privato { border: 1px dashed var(--linea); }
.revRiga { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--linea); padding-top: 10px; }
.revRiga img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; background: var(--campo); }
.yf-box { color: var(--testo); }

/* ---- strati (fogli e avvisi) ---- */
#strati { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.velo { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.velo.on { opacity: 1; }
.foglio { position: absolute; left: 0; right: 0; bottom: 0; max-width: 620px; margin: 0 auto; background: var(--carta); border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 40px rgba(0,0,0,.25); transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); pointer-events: auto; max-height: 90dvh; overflow-y: auto; overflow-x: hidden; }
.foglio.on { transform: translateY(0); }
.foglio > h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; padding-right: 48px; }
.foglio .voce { margin-top: 8px; }
.foglio .post { box-shadow: none; margin: 0 -18px -18px; border-radius: 0; }
.foglio.intera { top: 0; max-width: 620px; border-radius: 0; padding-top: calc(22px + env(safe-area-inset-top)); max-height: none; }
.foglio.intera .chiudiX { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; }
.manico { width: 40px; height: 4px; border-radius: 2px; background: var(--linea); margin: -6px auto 12px; }
.foglio.intera .manico { display: none; }
.toast { position: absolute; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--testo); color: var(--sfondo); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: 90%; text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .foglio, .velo, .toast { transition: none; } }
