/* «La tua galleria», fase 1 (disegno UX_design Vy1J6eVv, 09/10). Si carica solo con UCN_GALLERIA=si. Mai il prezzo. */

/* Segnalibro: cerchio bianco 34 px in alto a destra sulla foto, area di tocco 44 px; vuoto = non tenuta, magenta = tenuta.
   z-index sopra il velo nero della scheda al passaggio del mouse (.prod-overlay, 10) */
.ucn-gal-seg { position: absolute; top: 4px; right: 4px; z-index: 11; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; color: #111 }
.ucn-gal-seg__cerchio { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); display: flex; align-items: center; justify-content: center }
.ucn-gal-seg svg { width: 18px; height: 18px; fill: none; stroke: currentColor }
.ucn-gal-seg[aria-pressed="true"] { color: #e0007a }
.ucn-gal-seg[aria-pressed="true"] svg { fill: currentColor }
.ucn-gal-seg:focus-visible { outline: none }
.ucn-gal-seg:focus-visible .ucn-gal-seg__cerchio { outline: 2px solid #111; outline-offset: 2px }
.ucn-pm-gallery-main .ucn-gal-seg { top: 10px; right: 10px }

/* Contatore nell'intestazione, accanto al carrello: «La tua galleria» + numero; sul telefono stretto solo icona + numero */
.ucn-gal-conta { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; margin: 0 4px; border: 1.5px solid currentColor; border-radius: 20px; background: none; color: inherit; font: 700 11.5px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; white-space: nowrap; cursor: pointer; touch-action: manipulation; align-self: center }
.ucn-gal-conta[hidden] { display: none }
.ucn-gal-conta__icona { display: none; width: 15px; height: 15px }
.ucn-gal-conta__icona svg { width: 15px; height: 15px; fill: none; stroke: currentColor }
.ucn-gal-conta__n { font-style: normal; background: #e0007a; color: #fff; border-radius: 10px; min-width: 18px; padding: 2px 6px; text-align: center; font-variant-numeric: tabular-nums }
.ucn-gal-conta:focus-visible { outline: 2px solid currentColor; outline-offset: 2px }
/* intestazione del telefono (ucn-design-system.css, ≤ 900 px): le icone hanno un ordine; il contatore va subito prima del carrello */
@media (max-width: 900px) { .ucn-gal-conta { order: 3 } }
/* sempre icona + numero, anche sul computer: il carrello non si sposta mai (UX_design 09/10) */
  .ucn-gal-conta { border: 0; padding: 0 4px; margin: 0; gap: 2px; position: relative; min-width: 36px; height: 36px; justify-content: center }
  .ucn-gal-conta__testo { display: none }
  .ucn-gal-conta__icona { display: block }
  .ucn-gal-conta__n { position: absolute; top: 1px; right: -2px; min-width: 16px; padding: 2px 4px; font-size: 10px }

/* Avviso dopo il tocco (2 s): sopra la barra fissa «Acquista ora» della scheda opera sul telefono */
.ucn-gal-avviso { position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2147482000; background: #111; color: #fff; border-radius: 20px; padding: 9px 16px; font: 13px/1.3 "Helvetica Neue", Helvetica, Arial, sans-serif; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .2) }
.ucn-gal-avviso[hidden] { display: none }

/* Pannello: dal basso sul telefono (alto al massimo 80%), cassetto a destra 420 px sul computer, come il carrello */
html.ucn-gal-aperto { overflow: hidden }
.ucn-gal { position: fixed; inset: 0; z-index: 2147482500; font: 13px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif; color: #111 }
.ucn-gal[hidden] { display: none }
.ucn-gal__velo { position: absolute; inset: 0; background: rgba(0, 0, 0, .3); opacity: 0; transition: opacity .25s }
.ucn-gal__box { position: absolute; left: 0; right: 0; bottom: 0; max-height: 80vh; max-height: 80dvh; background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, .15); display: flex; flex-direction: column; transform: translateY(100%); transition: transform .25s ease; padding-bottom: env(safe-area-inset-bottom, 0px) }
.ucn-gal__box:focus { outline: none }
.ucn-gal--aperto .ucn-gal__velo { opacity: 1 }
.ucn-gal--aperto .ucn-gal__box { transform: none }
.ucn-gal__grab { width: 36px; height: 4px; border-radius: 2px; background: #d5d5d5; margin: 10px auto 0; flex: none }
.ucn-gal__corpo { overflow-y: auto; padding: 8px 16px 18px; display: grid; gap: 12px; align-content: start; overscroll-behavior: contain }
@media (min-width: 750px) {
  .ucn-gal__box { top: 0; left: auto; width: 420px; max-height: none; border-radius: 0; border-left: 1px solid #ddd; box-shadow: -10px 0 30px rgba(0, 0, 0, .12); transform: translateX(100%) }
  .ucn-gal__grab { display: none }
  .ucn-gal__corpo { padding: 18px 20px; gap: 14px }
}
@media (prefers-reduced-motion: reduce) { .ucn-gal__box, .ucn-gal__velo { transition: none } }
.ucn-gal__top { display: flex; align-items: center; gap: 10px }
.ucn-gal__top h2 { margin: 0; margin-right: auto; font: 700 19px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0; text-transform: none; color: #111 }
@media (min-width: 750px) { .ucn-gal__top h2 { font-size: 20px } }
.ucn-gal__x { width: 36px; height: 36px; margin-right: -8px; border: 0; background: none; color: #111; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center }
.ucn-gal__x svg { width: 18px; height: 18px }
.ucn-gal__mod, .ucn-gal__lascia { font: inherit; font-size: 12.5px; color: #333; background: none; border: 0; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer }
.ucn-gal__lascia { justify-self: center }
.ucn-gal__sub { margin: -6px 0 0; color: #666; font-size: 13px }
.ucn-gal__sub--una { margin: 0 }
.ucn-gal__piccolo { margin: 0; color: #777; font-size: 12px }
.ucn-gal__centro { text-align: center }
.ucn-gal__cta { display: flex; align-items: center; justify-content: center; height: 48px; border: 0; border-radius: 8px; background: #111; color: #fff; font: 700 14.5px "Helvetica Neue", Helvetica, Arial, sans-serif; text-decoration: none; cursor: pointer; width: 100% }
.ucn-gal__cta[aria-disabled="true"] { background: #cfcfcc; cursor: default }
.ucn-gal__vuota { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 8px 10px 6px; color: #444 }
.ucn-gal__vuota p { margin: 0 }
.ucn-gal__vuota-ic { width: 40px; height: 40px; border-radius: 50%; background: #f3f2ef; display: flex; align-items: center; justify-content: center }
.ucn-gal__vuota-ic svg { width: 18px; height: 18px }

/* Griglia delle opere tenute: 3 per riga, didascalia sotto (colore · formato), mai il prezzo */
.ucn-gal-griglia { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; padding-top: 8px }
.ucn-gal-it { position: relative; display: grid; gap: 5px; justify-items: center; text-align: center; min-width: 0 }
.ucn-gal-op { display: block; width: 84%; text-decoration: none; color: inherit; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation }
.ucn-gal-op:focus-visible { outline: 2px solid #111; outline-offset: 3px }
.ucn-gal-cap { font-size: 11px; color: #555; line-height: 1.3; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } /* una riga sola (UX_design 10/10) */
.ucn-gal-chk, .ucn-gal-x { position: absolute; top: -10px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; font: 800 12px "Helvetica Neue", Helvetica, Arial, sans-serif }
/* area di tocco 44 px attorno ai cerchi piccoli */
.ucn-gal-chk::after, .ucn-gal-x::after { content: ""; position: absolute; inset: -9px }
.ucn-gal-chk { left: 0; border: 2px solid #111; background: #fff; color: #111 }
.ucn-gal-chk[aria-pressed="true"] { background: #111; color: #fff }
.ucn-gal-x { right: 2px; border: 0; background: #111; color: #fff }
.ucn-gal-x svg { width: 12px; height: 12px }
.ucn-gal-chk:focus-visible, .ucn-gal-x:focus-visible, .ucn-gal__x:focus-visible, .ucn-gal__mod:focus-visible, .ucn-gal__lascia:focus-visible, .ucn-gal__cta:focus-visible { outline: 2px solid #111; outline-offset: 2px }

/* Miniature: wizard disegnata da /wizard/miniatura.js (fedele), catalogo = foto dell'opera */
.ucn-gal-min { display: block; width: 100%; position: relative }
.ucn-gal-min--w { aspect-ratio: 1417 / 1984; background: #f3f2ef }
.ucn-gal-min--w.ucn-gal-min--pronta { aspect-ratio: auto; background: none }
.ucn-gal-min--w .ucn-pw { padding: 0; background: none; border-radius: 0 }
.ucn-gal-min--c { aspect-ratio: 3 / 4; overflow: hidden; background: #f3f2ef }
.ucn-gal-min--c img { width: 100%; height: 100%; object-fit: cover; display: block }

/* Pagina del confronto */
.ucn-cf { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #fff; color: #111; font: 13px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif }
.ucn-cf__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top, 0px)); border-bottom: 1px solid #eee; font-size: 15px }
.ucn-cf__indietro { color: #111; text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px }
.ucn-cf__marchio { color: #111; text-decoration: none; font-size: 15px; white-space: nowrap }
.ucn-cf__nav { display: inline-flex; align-items: center; gap: 6px; color: #666; font-size: 13px }
.ucn-cf__nav[hidden] { display: none }
.ucn-cf__nav button { width: 36px; height: 36px; border: 0; background: none; font-size: 22px; line-height: 1; color: #111; cursor: pointer; padding: 0 }
.ucn-cf__nav button:disabled { color: #ccc; cursor: default }
.ucn-cf__main { flex: 1; background: #f3f2ef; display: flex; align-items: center; justify-content: center; padding: 18px 14px }
.ucn-cf__griglia { display: grid; gap: 12px; width: 100%; max-width: 1100px; align-items: end } /* opere appoggiate sulla stessa linea, come su un binario: etichette e «Scelgo questa» alla stessa quota (UX_design 11/10) */
.ucn-cf__griglia--2 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.ucn-cf__griglia--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px }
@media (min-width: 900px) { .ucn-cf__griglia--2 { max-width: 760px; gap: 32px } }
.ucn-cf__k { display: grid; gap: 8px; justify-items: center; text-align: center; font-size: 12px }
.ucn-cf__op { width: 92%; max-width: 300px }
.ucn-cf__r1 { font-size: 13px }
.ucn-cf__diff { color: #e0007a; font-weight: 700 }
.ucn-cf__pick { width: 100%; max-width: 300px; min-height: 48px; border: 0; border-radius: 7px; background: #111; color: #fff; font: 700 12.5px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif; cursor: pointer; padding: 8px 6px; display: flex; align-items: center; justify-content: center; text-align: center }
/* «Scelgo questa» può andare su 2 righe (DE/FR): tutti i bottoni alla stessa altezza, testo centrato (UX_design 11/10) */
.ucn-cf__piede { padding: 14px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; justify-items: center }
.ucn-cf__prendo { width: 100%; max-width: 420px; height: 46px; border: 1.5px solid #111; border-radius: 8px; background: #fff; color: #111; font: 700 14px "Helvetica Neue", Helvetica, Arial, sans-serif; cursor: pointer }
.ucn-cf__prendo[hidden] { display: none }
.ucn-cf__prendo[aria-busy="true"] { opacity: .55; cursor: progress }
.ucn-cf__errore { margin: 0; color: #b3261e; font-size: 12.5px }
.ucn-cf__errore[hidden] { display: none }
.ucn-cf__poche { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 360px }
.ucn-cf__poche p { margin: 0; font-size: 15px }
.ucn-cf a:focus-visible, .ucn-cf button:focus-visible { outline: 2px solid #111; outline-offset: 2px }

/* Fase 2: «Provale sulla parete» sotto «Confrontale» (pannello) e sotto «Le prendo tutte» (confronto) */
.ucn-gal__parete, .ucn-cf__parete { display: flex; align-items: center; justify-content: center; height: 46px; border: 1.5px solid #111; border-radius: 8px; background: #fff; color: #111; font: 700 14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-decoration: none; width: 100% }
.ucn-cf__parete { max-width: 420px; border: 0; height: 40px; text-decoration: underline; text-underline-offset: 3px; font-weight: 700 }
.ucn-gal__parete:focus-visible, .ucn-cf__parete:focus-visible { outline: 2px solid #111; outline-offset: 2px }

/* Fase 2: «Le tue pareti» in fondo al pannello: al massimo 3 schede piccole (stanza + «Soggiorno · 3 opere») */
.ucn-gal-pa__titolo { margin: 6px 0 0; font: 700 13px/1.3 "Helvetica Neue", Helvetica, Arial, sans-serif; color: #111 }
.ucn-gal-pa__fila { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px }
.ucn-gal-pa__it { position: relative; min-width: 0 }
.ucn-gal-pa { display: grid; gap: 4px; text-decoration: none; color: inherit; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation }
.ucn-gal-pa__stanza { position: relative; display: block; aspect-ratio: 375 / 440; overflow: hidden; border-radius: 6px; background: #ebe7e0 }
.ucn-gal-pa__stanza img { position: absolute; inset: 0; width: 100%; height: 100%; display: block }
.ucn-gal-pa__stanza i { position: absolute; display: block; overflow: hidden }
/* le opere della parete piccole, con i loro colori (UCNMiniatura); finché non arrivano: rettangolo chiaro */
.ucn-gal-pa__stanza i .ucn-gal-min { height: 100%; aspect-ratio: auto; background: #f3f2ef }
.ucn-gal-pa__stanza i .ucn-gal-min--pronta { background: none }
.ucn-gal-pa__cap { font-size: 11px; color: #555; line-height: 1.3; text-align: center }
.ucn-gal-pa:focus-visible { outline: 2px solid #111; outline-offset: 3px }
.ucn-gal-pa__it .ucn-gal-x { right: -6px }
/* riga grigia sotto «Provale sulla parete» quando fra le scelte ci sono opere della collezione */
.ucn-cf__parete-box { display: grid; gap: 4px; justify-items: center; width: 100%; max-width: 420px }
.ucn-cf__parete-box .ucn-gal__piccolo { margin: 0; color: #777; font-size: 12px; text-align: center }
/* «Le tue pareti»: una sola cornice anche nelle schede piccole (l'opera è disegnata senza la sua cornice) */
.ucn-gal-pa__cornice::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--cornice); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2) }
.ucn-gal-pa__cornice .ucn-pw-card-canvas { border-color: transparent }
