/* TRAMA sul web (21/10/2026): la grafica dell'app (Tema in TramaApp.swift) sopra lo stile del sito (stile.css).
   Sempre chiaro come l'app (bianco, nero, foto su carta, un solo blu). Misure in rem: seguono il testo grande del browser. */
:root { color-scheme: light; --saldi: #cc141a; --gutter: 16px; }
html { -webkit-text-size-adjust: 100%; }
body.web-app { background: #fff; color: var(--nero); overflow-wrap: break-word; hyphens: manual; }
body.foglio-aperto { overflow: hidden; }
:lang(ko) body, :lang(ko) .web-app { word-break: keep-all; }
:lang(ja), :lang(zh-Hans) { line-break: strict; }
/* niente spazio tra le lettere negli alfabeti asiatici e in hindi (regola 10) */
:lang(hi) body *, :lang(ja) body *, :lang(ko) body *, :lang(zh-Hans) body * { letter-spacing: 0 !important; }
:lang(hi) .marchio, :lang(ja) .marchio, :lang(ko) .marchio, :lang(zh-Hans) .marchio { letter-spacing: .14em !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
button:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 2px solid var(--blu); outline-offset: 2px; }
input, select { font: inherit; color: var(--nero); }

.web-app .barra { padding: 14px var(--gutter); gap: 0 12px; flex-wrap: wrap; }
.web-app .barra .marchio { font-size: 1.5rem; }
.menu-app { display: flex; gap: 2px; margin-left: auto; }
.menu-app .voce { padding: 10px 8px; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; border-bottom: 2px solid transparent; }
.menu-app .voce.attiva { border-bottom-color: var(--nero); }
body.in-domande .barra, body.in-domande footer { display: none; }

#app { min-height: 70vh; }
.etichetta { font-size: .75rem; }
.etichetta.nera { color: var(--nero); margin: 34px 0 12px; }
.web-app .nota { color: var(--grigio); font-size: .875rem; margin-top: 12px; padding-bottom: 0; }  /* stile.css ha un'altra .nota */
.grigio { color: var(--grigio); font-size: .875rem; }
.avviso { margin-top: 16px; padding: 14px 16px; background: var(--carta); font-size: .9375rem; border-left: 3px solid var(--blu); }
.errore { color: var(--saldi); font-size: .9375rem; margin-top: 10px; }

/* pulsanti come BottonePieno e BottoneVuoto dell'app: testo su una riga, mai parole spezzate */
.pieno, .vuoto-btn, .chiaro, .rosso { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 20px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; text-align: center;
  overflow-wrap: normal; word-break: normal; hyphens: none; }
/* il testo dei pulsanti va a capo solo tra una parola e l'altra, mai dentro una parola (regola 4) */
.pieno { background: var(--nero); color: #fff; }
.vuoto-btn { border: 1px solid var(--nero); }
.chiaro { background: #fff; color: var(--nero); }
.rosso { border: 1px solid var(--saldi); color: var(--saldi); margin-top: 8px; white-space: normal; text-transform: none; letter-spacing: 0; font-size: .9375rem; }
.corto { min-height: 46px; padding: 0 16px; }

/* copertina */
.app-copertina { min-height: calc(100svh - 64px); }
.app-copertina .testo { padding: 0 var(--gutter) 9vh; }
.app-copertina h1 { font-size: clamp(2.6rem, 10vw, 5rem); }
.app-copertina .chiaro { min-width: 220px; }
.app-copertina .piccolo { margin-top: 16px; font-size: .875rem; color: rgba(255,255,255,.88); }

/* domande */
.domande { max-width: 720px; margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; }
.testa-domande { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: 10px var(--gutter) 8px; }
.testa-domande .conta { text-align: right; font-size: .8125rem; color: var(--grigio); font-variant-numeric: tabular-nums; white-space: nowrap; }
.piccolo-marchio { font-size: 1.25rem !important; text-align: center; }
.icona { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; line-height: 1; }
.avanzamento { height: 2px; background: var(--linea); }
.avanzamento span { display: block; height: 2px; background: var(--nero); transition: width .3s; }
.corpo-domande { flex: 1; padding: 28px var(--gutter) 120px; }
.domanda { font-family: var(--serif); font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.08; }
.sotto-domanda { color: var(--grigio); margin: 10px 0 26px; }
.campo { margin-top: 26px; }
.campo .etichetta { margin-bottom: 10px; color: var(--nero); }
.piede-domande { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--linea); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
.piede-domande .pieno { width: 100%; }
.riga-altezza { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.riga-altezza strong { font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--nero); height: 32px; }

/* scelte: tutte visibili, due per riga sul telefono (regola 4) */
.scelte { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 8px; }
.scelta { min-height: 48px; padding: 10px 14px; border: 1px solid var(--linea); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.scelta span { font-size: .9375rem; }
.scelta small { font-size: .8125rem; color: var(--grigio); line-height: 1.35; }
.scelta.attiva { border-color: var(--nero); background: var(--nero); color: #fff; }
.scelta.attiva small { color: rgba(255,255,255,.8); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border: 1px solid var(--linea); font-size: .875rem; white-space: nowrap; }
.chip.attiva { background: var(--nero); border-color: var(--nero); color: #fff; font-weight: 600; }
.chip.barra.attiva { text-decoration: line-through; }

.generi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.genere .collage { aspect-ratio: .8; }
.genere.attiva .collage::after, .stile.attiva .collage::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--nero); pointer-events: none; z-index: 2; }
.riga-genere { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.spunta { width: 20px; height: 20px; border: 1.5px solid var(--nero); border-radius: 50%; flex: none; }
.attiva > .riga-genere .spunta { background: var(--nero); box-shadow: inset 0 0 0 4px #fff; }
.stili { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: 22px 10px; }
.stile { display: flex; flex-direction: column; gap: 6px; }
.stile .collage { aspect-ratio: .85; position: relative; }
.stile.attiva .collage::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--nero); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .875rem; z-index: 3; }
.nome-stile { font-size: .8125rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.desc-stile { font-size: .8125rem; color: var(--grigio); line-height: 1.4; }

/* collage dei capi (CollageCapi dell'app) */
.collage { position: relative; width: 100%; background: var(--carta); overflow: hidden; }
.collage .pezzo { position: absolute; display: block; }
.collage .pezzo img { width: 100%; height: 100%; object-fit: contain; }
.collage .pezzo.acc { left: 79%; top: 76%; width: 20%; height: auto; aspect-ratio: 1; }
.collage.esempi .e0 { left: 0; top: 0; width: 55%; height: 55%; }
.collage.esempi .e1 { left: 50%; top: 0; width: 48%; height: 80%; }
.collage.esempi .e2 { left: 8%; top: 56%; width: 40%; height: 44%; }

/* oggi */
.oggi, .profilo { max-width: 1180px; margin: 0 auto; }
.intestazione { padding: 26px var(--gutter) 18px; }
.intestazione h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); margin-bottom: 14px; }
.meteo { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 6px 0; font-size: .9375rem; }
.meteo .cambia { color: var(--blu); font-size: .8125rem; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.citta { background: var(--carta); padding: 18px 16px; margin-top: 8px; max-width: 640px; }
.citta .etichetta { color: var(--nero); margin-bottom: 4px; display: block; }
.citta .nota { margin: 0 0 12px; }
.riga-citta { display: flex; gap: 8px; }
.riga-citta input { flex: 1; min-width: 0; min-height: 46px; padding: 0 12px; border: 1px solid var(--linea); background: #fff; font-size: 1rem; }
.citta .oppure { margin: 18px 0 8px; }
.citta .chip { background: #fff; }
.citta .chip.attiva { background: var(--nero); }
.nota-stili { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding: 12px 14px; background: var(--carta); font-size: .875rem; max-width: 640px; }
.occasioni { display: flex; flex-wrap: wrap; gap: 0 22px; padding: 0 var(--gutter); border-bottom: 1px solid var(--linea); }
.occ { padding: 12px 0 10px; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; border-bottom: 2px solid transparent; }
.occ.attiva { font-weight: 600; border-bottom-color: var(--nero); }
.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 44px 28px; padding: 30px var(--gutter) 10px; }
.looks > .attesa, .looks > .vuoto, .looks > .fonte { grid-column: 1 / -1; }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.foto-look { position: relative; display: block; width: 100%; }
.foto-look .collage { aspect-ratio: .92; }
.sopra-foto { position: absolute; top: 14px; left: 14px; margin: 0; color: var(--nero); }
.badge { position: absolute; left: 12px; bottom: 12px; }
.sconto { display: inline-block; background: var(--saldi); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 7px; }
.card > .etichetta { margin: 6px 0 0; }
.totale { font-size: 1.1875rem; }
.risparmi { font-size: .8125rem; color: var(--saldi); font-weight: 500; }
.frase { color: var(--grigio); font-size: .9375rem; }
.miniature { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.mini { flex: none; width: 74px; display: flex; flex-direction: column; gap: 5px; font-size: .75rem; }
.carta { display: block; position: relative; background: var(--carta); aspect-ratio: .8; padding: 6px; }
.carta img { width: 100%; height: 100%; object-fit: contain; }
.prezzo { font-weight: 600; }
.prezzo.saldo { color: var(--saldi); }
.prezzo-pieno { color: var(--grigio); font-size: .85em; font-weight: 400; }
.azioni { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 6px; }
.azioni .pieno, .azioni .vuoto-btn { width: 100%; padding: 0 12px; }
.attesa { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 160px; color: var(--grigio); font-size: .9375rem; }
.giro { width: 22px; height: 22px; border: 2px solid var(--linea); border-top-color: var(--nero); border-radius: 50%; animation: giro .9s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .giro { animation-duration: 3s; } .avanzamento span { transition: none; } }
.vuoto { text-align: center; padding: 30px 0; max-width: 560px; margin: 0 auto; }
.vuoto h2 { font-size: 1.75rem; margin-bottom: 12px; }
.vuoto p { color: #333; margin-bottom: 18px; }
.fonte { text-align: center; }

/* invito all'app */
.invito { margin: 50px var(--gutter) 30px; padding: 30px 22px; background: var(--nero); color: #fff; }
.invito h2 { font-size: clamp(1.75rem, 5vw, 2.4rem); margin-bottom: 20px; }
.invito-voci { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px 28px; }
.invito h3 { margin: 0 0 4px; font-size: .8125rem; color: #fff; }
.invito p { color: rgba(255,255,255,.82); font-size: .9375rem; }
.invito .presto { display: inline-block; margin-top: 24px; background: #fff; color: var(--nero); padding: 12px 20px; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* fogli: il look aperto e «Dove comprarlo» */
.foglio { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.35); display: flex; justify-content: center; align-items: stretch; }
.foglio[hidden] { display: none; }
.foglio-dentro { background: #fff; width: 100%; max-width: 760px; display: flex; flex-direction: column; height: 100%; }
.foglio-dentro.stretto { max-width: 560px; }
.testa-foglio { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px var(--gutter); border-bottom: 1px solid var(--linea); }
.scorre { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.det-foto { position: relative; }
.det-foto .collage { aspect-ratio: 1; max-height: 62vh; }
.det-corpo { padding: 22px var(--gutter) 30px; }
.det-corpo h2, .dove h2 { font-size: clamp(1.75rem, 6vw, 2.2rem); margin: 0 0 6px; }
.perche { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.perche li { position: relative; padding-left: 26px; font-size: .9375rem; }
.perche li::before { content: ""; position: absolute; left: 0; top: .72em; width: 14px; height: 2px; background: var(--blu); }
.griglia-capi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
.scheda { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.scheda .carta.grande { aspect-ratio: .82; padding: 10px; margin-bottom: 6px; }
.scheda .badge { left: 8px; bottom: 8px; }
.nome-capo { font-size: .9375rem; line-height: 1.35; }
.originale { color: var(--grigio); font-size: .8125rem; }
.negozio { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.scheda .pieno { margin-top: 8px; width: 100%; }
.invito .etichetta.chiara { margin-bottom: 8px; }
.det-corpo .invito { margin: 40px 0 10px; }
.barra-sotto { border-top: 1px solid var(--linea); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); }
.barra-sotto .etichetta { margin: 0; }
.barra-sotto strong { font-size: 1.0625rem; }

.dove { padding: 20px var(--gutter) 34px; }
.testa-dove { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 10px; }
.carta.media { width: 84px; flex: none; aspect-ratio: 84 / 105; padding: 8px; }
.carta.piccola { width: 52px; flex: none; aspect-ratio: 52 / 64; padding: 4px; }
.testa-dove > div { min-width: 0; }
.dove .etichetta.nera:first-of-type { margin-top: 24px; }
.negozio-suo { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; padding: 0 18px; background: var(--nero); color: #fff;
  text-decoration: none; font-size: .875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.negozio-suo span:last-child { white-space: nowrap; letter-spacing: 0; }
.spedizione { margin-top: 8px; font-size: .875rem; }
.riga-sped { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; }
.riga-sped strong { white-space: nowrap; }
.blu { color: var(--blu); }
.offerta { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); text-decoration: none; }
.testo-offerta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.testo-offerta .grigio { font-size: .8125rem; }
.migliore { color: var(--blu); font-size: .75rem; font-weight: 600; }
.offerta strong { white-space: nowrap; }
.freccia { color: var(--grigio); }
.altri-negozi { border-top: 1px solid var(--linea); }
.cerca-su { display: flex; justify-content: space-between; align-items: center; min-height: 50px; border-bottom: 1px solid var(--linea); text-decoration: none;
  font-size: .8125rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.cerca-su span:last-child { color: var(--grigio); font-size: 1.1rem; }
.codice { margin-top: 26px; padding: 16px; background: var(--carta); font-size: .9375rem; display: flex; flex-direction: column; gap: 8px; }
.codice .etichetta.nera { margin: 0; }
.titolo-codice { font-weight: 600; }
.copia { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 14px; border: 1px dashed var(--nero); background: #fff;
  font-family: ui-monospace, Menlo, monospace; font-size: 1rem; letter-spacing: .08em; }
.copia .stato { font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.condizioni { padding-left: 18px; color: var(--grigio); font-size: .8125rem; }

/* profilo */
.profilo { padding: 26px var(--gutter) 10px; max-width: 760px; }
.profilo h1 { font-size: clamp(2.2rem, 7vw, 3rem); }
.profilo .gruppo { font-family: var(--sans); font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--grigio); margin: 34px 0 6px; }
.riga-profilo { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; width: 100%; min-height: 52px;
  padding: 10px 0; border-bottom: 1px solid var(--linea); font-size: .9375rem; }
.riga-profilo .valore { color: var(--grigio); text-align: right; margin-left: auto; min-width: 0; }
.azioni-profilo { margin-top: 22px; }
.lingua { min-height: 46px; padding: 0 12px; border: 1px solid var(--linea); background: #fff; min-width: 220px; }
.profilo .invito { margin: 50px 0 20px; }

footer small { display: block; margin-top: 6px; }
footer small a { color: inherit; }

@media (min-width: 760px) {
  :root { --gutter: 5vw; }
  .foglio { padding: 4vh 0; }
  .foglio-dentro { height: auto; max-height: 92vh; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
  .griglia-capi { grid-template-columns: repeat(3, 1fr); }
  .det-foto .collage { aspect-ratio: 1.35; max-height: none; }
  .azioni { grid-template-columns: 1fr 1fr; }

  .invito { padding: 44px 5vw; }
}
.stili { max-width: 100%; }
@media (min-width: 760px) { .stili { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); } }
@media (max-width: 380px) { .azioni { grid-template-columns: 1fr; } }
