/* =====================================================================
   FIMAS — Galleria 2026 · VETRINA (slide a tutta larghezza)
   Le realizzazioni della pagina scorrono come una presentazione: foto a
   tutto schermo in lento avvicinamento, titolo che entra da sotto,
   barrette di avanzamento, numerazione, frecce e trascinamento.
   Sotto la vetrina resta la griglia con tutte le opere.

   Lo scorrimento automatico, l'avvicinamento della foto e le entrate
   del testo si attivano solo con la classe .shw-on (la mette
   galleryShowcase2026.js): senza JavaScript si vede la prima foto con
   il suo titolo e il pulsante, tutto leggibile e cliccabile.
   ===================================================================== */

body.is-gallery .shw {
  position: relative;
  margin: 0;
  max-width: none;
  width: 100%;
  /* la foto sta al centro nelle sue proporzioni invece di essere stirata da bordo
     a bordo; intorno il fondo bianco della pagina (la fascia scura ai lati e' stata
     provata e scartata il 02/10/2026) */
  padding: 20px clamp(14px, 3vw, 48px) 0;
}

body.is-gallery .shw__frame {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: #333333;
  box-shadow: 0 40px 80px -46px rgba(25, 20, 15, .6);
  /* foto 16:9 + fascia della didascalia sotto (--shw-strip), insieme alte quanto il resto
     del primo schermo sotto nav e testata (l'altezza della testata la misura il JS).
     A tutta larghezza il riquadro arrivava a 3:1 e le foto (quasi tutte 4:3 o 16:9)
     ne mostravano meno di meta' altezza: sembravano stirate (02/10/2026) */
  --shw-strip: 72px;
  --shw-h: clamp(380px, calc(100vh - var(--fms-nav-total-h, 188px) - var(--shw-testata, 145px) - 30px - var(--shw-strip)), 760px);
  width: min(100%, 1480px, calc(var(--shw-h) * 16 / 9));
  margin: 0 auto;
  isolation: isolate;
  container-type: inline-size;
}

/* ---------- binario e slide ---------- */
body.is-gallery .shw__track {
  display: flex;
  align-items: stretch;
  will-change: transform;
}
.shw-on body.is-gallery .shw__track {
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
body.is-gallery .shw__track.is-dragging { transition: none !important; }
/* salto lungo (dall'ultima alla prima, o una barretta lontana): niente scorrimento
   attraverso tutte le slide in mezzo, la nuova compare in dissolvenza */
body.is-gallery .shw__track.is-jump { transition: none !important; }
@keyframes shwFadeIn { from { opacity: 0; } to { opacity: 1; } }
.shw-on body.is-gallery .shw__slide.is-fadein .shw__media { animation: shwFadeIn .6s ease both; }

/* ogni slide: la foto e, sotto, la sua didascalia */
body.is-gallery .shw__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
}

/* ---------- foto ---------- */
body.is-gallery .shw__media {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
/* browser senza aspect-ratio: altezza fissa */
@supports not (aspect-ratio: 16 / 9) {
  body.is-gallery .shw__media { height: var(--shw-h); }
}
body.is-gallery .shw__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .7s ease;
  transform: scale(1.02);
}
body.is-gallery .shw__media img.is-ready { opacity: 1; }
/* foto verticali: intere su fondo scuro, non tagliate a striscia */
body.is-gallery .shw__media img.is-tall { object-fit: contain; }
/* inquadratura centrata (prospettiva originale): ancorate in basso, nel riquadro panoramico
   le foto sembravano zoomate sul pavimento (provato il 02/10/2026 e scartato) */

/* lento avvicinamento, solo sulla slide in primo piano */
@keyframes shwKen {
  from { transform: scale(1.015) translate3d(0, 0, 0); }
  to   { transform: scale(1.085) translate3d(0, -0.8%, 0); }
}
/* durata vicina a quella della slide (3 secondi): un avvicinamento molto piu'
   lungo non si farebbe notare */
.shw-on body.is-gallery .shw__slide.is-active .shw__media img.is-ready,
.shw-on body.is-gallery .shw__slide.is-leaving .shw__media img.is-ready {
  animation: shwKen 4s ease-out both;
}

/* Niente velo e niente scritte sulla foto: le fotografie dei lavori sono il contenuto e
   si devono vedere pulite. */

/* ---------- didascalia ---------- */
/* fascia scura SOTTO la foto (richiesta dell'utente, 02/10/2026: sopra la foto disturbava
   l'immagine). Scorre insieme alla sua slide. A sinistra categoria e titolo, a destra
   lavorazione, spessore e "Apri la scheda"; in fondo a destra resta posto per la pausa. */
body.is-gallery .shw__body {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "cat meta cta" "title meta cta";
  align-items: center;
  column-gap: 18px;
  min-height: var(--shw-strip);
  padding: 10px 76px 10px clamp(16px, 1.8vw, 24px);
  background: #333333;          /* nero antracite, come lo switch lingue e il pulsante Avviso */
  color: #fff;
}
body.is-gallery .shw__cat {
  grid-area: cat;
  align-self: end;
  display: inline-block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #ffd9b4;
  margin: 0 0 3px;
}
body.is-gallery .shw__title {
  grid-area: title;
  align-self: start;
  font-family: var(--g-serif);
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 21px);
  line-height: 1.14;
  margin: 0;
  color: #fff;
}
body.is-gallery .shw__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 420px;
  margin: 0;
}
body.is-gallery .shw__tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 0;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
}
/* arancione scuro: col bianco sopra il contrasto e' 4,7:1 (con l'arancione chiaro era 3:1) */
body.is-gallery .shw__tag--first {
  background: var(--g-acc-ink);
  border-color: var(--g-acc-ink);
}
body.is-gallery .shw__cta {
  grid-area: cta;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 0;
  background: #fff;
  color: #1b1b1b !important;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: transform .35s var(--g-ease), box-shadow .35s var(--g-ease), background .25s;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6);
}
body.is-gallery .shw__cta svg { width: 12px; height: 12px; transition: transform .35s var(--g-ease); }
body.is-gallery .shw__cta:hover {
  background: var(--g-acc);
  color: #fff !important;
  transform: translateY(-2px);
}
body.is-gallery .shw__cta:hover svg { transform: translateX(4px); }
/* riquadro stretto: sempre due righe (categoria + etichette, titolo + pulsante) */
@container (max-width: 820px) {
  body.is-gallery .shw__body {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "cat meta" "title cta";
    row-gap: 3px;
  }
  body.is-gallery .shw__cat { align-self: center; margin: 0; }
  body.is-gallery .shw__meta { max-width: none; }
}

/* entrata del testo a scalare, solo sulla slide in primo piano */
@keyframes shwUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Il testo e' SEMPRE visibile: l'entrata a scalare e' un extra che parte quando il
   JavaScript marca la slide con .is-entering e viene tolta a fine animazione.
   Se le animazioni non vengono eseguite (scheda in secondo piano, browser vecchio,
   impostazione di sistema) il titolo si legge comunque: il caso peggiore e' "nessuna
   animazione", non "testo invisibile". */
.shw-on body.is-gallery .shw__slide.is-entering .shw__body > * {
  animation: shwUp .8s cubic-bezier(.2, .7, .2, 1) both;
}
.shw-on body.is-gallery .shw__slide.is-entering .shw__cat   { animation-delay: .12s; }
.shw-on body.is-gallery .shw__slide.is-entering .shw__title { animation-delay: .20s; }
.shw-on body.is-gallery .shw__slide.is-entering .shw__meta  { animation-delay: .30s; }
.shw-on body.is-gallery .shw__slide.is-entering .shw__cta   { animation-delay: .40s; }

/* ---------- barrette di avanzamento ---------- */
/* barrette e numerazione dentro una fascia scura stretta: senza il velo generale,
   su una piazza bianchissima il bianco su bianco non si vedrebbe */
body.is-gallery .shw__topbar {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
  padding: 8px clamp(12px, 1.6vw, 18px);
  border-radius: 0;
  background: rgba(51, 51, 51, .62);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .12);
}
body.is-gallery .shw__bars {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 6px;
}
body.is-gallery .shw__bar {
  flex: 1 1 0;
  min-width: 0;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .28);
  cursor: pointer;
  overflow: visible;
  position: relative;
  transition: height .2s var(--g-ease), background .2s;
}
/* area di tocco invisibile alta ~24 px: la barretta resta sottile ma si prende col dito */
body.is-gallery .shw__bar::before {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: -10px;
  bottom: -10px;
}
body.is-gallery .shw__bar:hover { height: 7px; background: rgba(255, 255, 255, .5); }
body.is-gallery .shw__bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 99px;
}
body.is-gallery .shw__bar.is-done > i { width: 100%; }
/* la barretta della slide corrente si riempie nel tempo dell'attesa */
.shw-on body.is-gallery .shw__bar.is-current > i {
  animation: shwFill var(--shw-dur, 6500ms) linear both;
}
@keyframes shwFill { from { width: 0; } to { width: 100%; } }
body.is-gallery .shw.is-paused .shw__bar.is-current > i { animation-play-state: paused; }
body.is-gallery .shw__bar:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- numerazione ---------- */
body.is-gallery .shw__count {
  flex: 0 0 auto;
  margin: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
body.is-gallery .shw__count b { font-size: 14px; }
body.is-gallery .shw__count span { opacity: .65; }

/* icona "tutto schermo" accanto alla numerazione: apre la presentazione */
body.is-gallery .shw__full {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: -4px -6px -4px 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 0;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
body.is-gallery .shw__full svg { width: 14px; height: 14px; }
body.is-gallery .shw__full:hover { background: var(--g-acc); border-color: var(--g-acc); }
body.is-gallery .shw__full:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- frecce e pausa ---------- */
body.is-gallery .shw__nav,
body.is-gallery .shw__pause {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(51, 51, 51, .5);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transition: background .25s, transform .3s var(--g-ease), opacity .25s;
}
body.is-gallery .shw__nav {
  width: 50px; height: 50px;
  top: calc(50% - var(--shw-strip) / 2);
  top: calc(100cqw * 9 / 32);   /* centro esatto della foto 16:9 (cqw = larghezza del riquadro) */
  margin-top: -25px;
  font-size: 0;
}
body.is-gallery .shw__nav svg { width: 20px; height: 20px; }
body.is-gallery .shw__nav--prev { left: clamp(10px, 1.6vw, 20px); }
body.is-gallery .shw__nav--next { right: clamp(10px, 1.6vw, 20px); }
body.is-gallery .shw__nav:hover { background: var(--g-acc); border-color: var(--g-acc); }
body.is-gallery .shw__nav--prev:hover { transform: translateX(-3px); }
body.is-gallery .shw__nav--next:hover { transform: translateX(3px); }
body.is-gallery .shw__nav:focus-visible,
body.is-gallery .shw__pause:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

body.is-gallery .shw__pause {
  width: 38px; height: 38px;
  bottom: calc((var(--shw-strip) - 38px) / 2);
  right: clamp(16px, 1.8vw, 24px);
}
body.is-gallery .shw__pause svg { width: 14px; height: 14px; }
body.is-gallery .shw__pause:hover { background: #242424; }
body.is-gallery .shw__pause .shw-ico-play { display: none; }
body.is-gallery .shw.is-user-paused .shw__pause .shw-ico-play { display: block; }
body.is-gallery .shw.is-user-paused .shw__pause .shw-ico-pause { display: none; }

/* ---------- invito a scorrere verso la griglia ---------- */
body.is-gallery .shw__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 14px auto 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--g-muted);
}
body.is-gallery .shw__hint svg { width: 14px; height: 14px; }
.shw-on body.is-gallery .shw__hint svg { animation: shwBob 1.9s var(--g-ease) infinite; }
@keyframes shwBob {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* ---------- trascinamento ---------- */
body.is-gallery .shw__frame { cursor: grab; touch-action: pan-y; }
body.is-gallery .shw__frame.is-dragging { cursor: grabbing; }
/* durante il trascinamento i link non devono partire per sbaglio */
body.is-gallery .shw__frame.is-dragging a { pointer-events: none; }

/* ---------- schermi piccoli ----------
   telefono e tablet: foto a tutta larghezza in 4:3 e testo SOTTO la foto,
   cosi' la scritta non copre mai la fotografia */
@media (max-width: 860px) {
  body.is-gallery .shw { padding: 0; }
  body.is-gallery .shw__frame { width: 100%; }
  body.is-gallery .shw__media { aspect-ratio: 4 / 3; }
  body.is-gallery .shw__body { display: block; min-height: 0; padding: 11px 14px 13px; }
  body.is-gallery .shw__cat { margin-bottom: 5px; }
  body.is-gallery .shw__title { font-size: clamp(16px, 4.4vw, 20px); margin: 0 0 6px; }
  body.is-gallery .shw__meta { justify-content: flex-start; max-width: none; margin: 0 0 9px; }
  /* frecce a meta' della foto (larga quanto lo schermo, alta 3/4) */
  body.is-gallery .shw__nav { width: 42px; height: 42px; top: 37.5vw; top: calc(100cqw * 3 / 8); margin-top: -21px; }
  body.is-gallery .shw__topbar { padding: 7px 12px; gap: 12px; }
  body.is-gallery .shw__pause { top: 52px; right: 12px; bottom: auto; }
}
@supports not (aspect-ratio: 4 / 3) {
  @media (max-width: 860px) {
    body.is-gallery .shw__media { height: 75vw; }
  }
}
@media (max-width: 520px) {
  body.is-gallery .shw__nav { display: none; }      /* su telefono si trascina */
  body.is-gallery .shw__cta { padding: 7px 12px; font-size: 10px; }
  body.is-gallery .shw__count b { font-size: 15px; }
}

/* ---------- durante ricerca e filtri la vetrina si ritira ----------
   (le slide sono le opere messe in pagina dal PHP: durante una ricerca non
   corrisponderebbero piu' ai risultati mostrati nella griglia) */
body.is-gallery .shw {
  transition: opacity .35s var(--g-ease), max-height .5s var(--g-ease), margin .35s var(--g-ease),
              padding .35s var(--g-ease), visibility 0s;
  max-height: 1200px;
  overflow: hidden;
}
body.is-gallery .shw.is-hidden {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
  /* fuori anche dal giro del tasto Tab, ma solo a ritiro finito */
  visibility: hidden;
  transition: opacity .35s var(--g-ease), max-height .5s var(--g-ease), margin .35s var(--g-ease),
              padding .35s var(--g-ease), visibility 0s linear .5s;
}

/* ---------- chi ha chiesto meno animazioni ---------- */
@media (prefers-reduced-motion: reduce) {
  body.is-gallery .shw { transition: none !important; }
  body.is-gallery .shw__slide .shw__media { animation: none !important; }
  body.is-gallery .shw__track { transition: none !important; }
  body.is-gallery .shw__media img,
  body.is-gallery .shw__body,
  body.is-gallery .shw__body > * { animation: none !important; opacity: 1 !important; transform: none !important; }
  body.is-gallery .shw__bar > i { animation: none !important; }
  body.is-gallery .shw__hint svg { animation: none !important; }
}


/* =====================================================================
   PRESENTAZIONE A TUTTO SCHERMO (02/10/2026)
   Tutte le opere dell'elenco una alla volta su fondo nero, come la
   presentazione delle foto di Windows (gallerySlideshow2026.js).
   La foto e' sempre intera (contain): niente ritagli e niente zoom.
   Le scritte stanno nella barra SOTTO la foto, mai sopra.
   ===================================================================== */

/* pulsante nella fascia scura, accanto al contatore */
body.is-gallery #testata .g26-play {
  order: 2;
  display: inline-flex;
  align-items: stretch;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--t-ink, #333333);
  color: #fff;
  font-family: var(--g-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 22px -16px rgba(0, 0, 0, .45);
  transition: background .2s, color .2s;
}
body.is-gallery #testata .g26-play svg {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 11px;
  box-sizing: border-box;
  background: var(--g-acc);
  color: #fff;
  transition: background .2s;
}
body.is-gallery #testata .g26-play span {
  display: inline-flex;
  align-items: center;
  padding: 0 14px 0 12px;
}
body.is-gallery #testata .g26-play:hover { background: #242424; color: #fff; }
body.is-gallery #testata .g26-play:hover svg { background: var(--g-acc-ink); }
body.is-gallery #testata .g26-play:focus-visible { outline: 2px solid var(--g-acc); outline-offset: 3px; }
body.is-gallery #testata .g26-play[hidden] { display: none !important; }

/* ---------- la presentazione ---------- */
html.ssw-open,
html.ssw-open body { overflow: hidden !important; }

.ssw {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  font-family: 'Montserrat', system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ssw[hidden] { display: none !important; }
.ssw:focus { outline: none; }
.ssw::backdrop { background: #000; }
.ssw:fullscreen { width: 100%; height: 100%; }

.ssw__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}
.ssw__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity .7s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}
.ssw__img.is-on { opacity: 1; }

.ssw__spin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 2px solid rgba(255, 255, 255, .16);
  border-top-color: #E87722;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: sswGira .9s linear infinite;
  transition: opacity .2s;
}
/* la rotella compare solo se il caricamento dura piu' di un attimo */
.ssw.is-loading .ssw__spin { opacity: 1; transition-delay: .35s; }
@keyframes sswGira { to { transform: rotate(360deg); } }

.ssw__msg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 40px));
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
}

.ssw__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 0;
  background: rgba(16, 13, 10, .55);
  color: #fff;
  cursor: pointer;
  transition: opacity .35s, background .2s, border-color .2s;
}
.ssw__nav svg { width: 22px; height: 22px; }
.ssw__nav--prev { left: clamp(10px, 2vw, 28px); }
.ssw__nav--next { right: clamp(10px, 2vw, 28px); }
.ssw__nav:hover { background: #E87722; border-color: #E87722; }

/* barra sotto la foto: didascalia a sinistra, comandi a destra */
.ssw__bar {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 10px clamp(14px, 2.4vw, 32px) calc(10px + env(safe-area-inset-bottom, 0px));
  background: #0e0c0a;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.ssw__prog {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
}
.ssw__prog i {
  position: absolute;
  inset: 0;
  background: #E87722;
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.ssw__prog i.is-run { animation: sswBarra 4000ms linear forwards; }
.ssw.is-paused .ssw__prog i { animation-play-state: paused; }
@keyframes sswBarra { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.ssw__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ssw__cat {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #f0904a;
}
.ssw__cat:empty { display: none; }
.ssw__line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.ssw__title {
  min-width: 0;
  font-family: 'Montserrat', system-ui, sans-serif;   /* come il titolo della vetrina */
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ssw__meta {
  flex: 0 0 auto;
  font-size: 11px;
  color: rgba(255, 255, 255, .58);
  white-space: nowrap;
}

.ssw__ctrl {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity .4s;
}
.ssw__count {
  margin-right: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .6);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ssw__count b { font-size: 15px; font-weight: 700; color: #fff; }
.ssw__count span { margin: 0 4px; }
.ssw__count em { font-style: normal; }
.ssw__btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 0;
  background: rgba(255, 255, 255, .05);
  color: #fff;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.ssw__btn svg { width: 16px; height: 16px; }
.ssw__btn:hover { background: #E87722; border-color: #E87722; }
.ssw__btn--play .ssw-ico-play { display: none; }
.ssw.is-user-paused .ssw__btn--play .ssw-ico-play { display: block; }
.ssw.is-user-paused .ssw__btn--play .ssw-ico-pause { display: none; }
.ssw__btn--close { margin-left: 6px; }
.ssw__open {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.ssw__open svg { width: 13px; height: 13px; }
.ssw__open:hover { background: #fff; border-color: #fff; color: #1b1b1b !important; }
.ssw__nav:focus-visible,
.ssw__btn:focus-visible,
.ssw__open:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* nessuna opera da mostrare (elenco vuoto o errore): restano il messaggio e la chiusura */
.ssw.is-empty .ssw__count,
.ssw.is-empty .ssw__btn--play,
.ssw.is-empty .ssw__open,
.ssw.is-empty .ssw__nav,
.ssw.is-empty .ssw__prog { display: none; }

/* mouse fermo: via frecce e puntatore, i comandi in basso si attenuano */
.ssw.is-idle .ssw__nav { opacity: 0; pointer-events: none; }
.ssw.is-idle .ssw__nav:focus-visible { opacity: 1; pointer-events: auto; }
.ssw.is-idle .ssw__ctrl { opacity: .4; }
.ssw.is-idle,
.ssw.is-idle * { cursor: none !important; }

@media (max-width: 640px) {
  .ssw__bar { flex-wrap: wrap; gap: 10px 12px; padding-top: 12px; }
  .ssw__info { flex: 1 1 100%; }
  .ssw__line { flex-wrap: wrap; gap: 2px 10px; }
  .ssw__title { white-space: normal; font-size: 15px; }
  .ssw__ctrl { flex: 1 1 100%; justify-content: flex-end; }
  .ssw__count { margin-right: auto; }
  .ssw__nav { width: 44px; height: 44px; margin-top: -22px; }
  .ssw__nav svg { width: 18px; height: 18px; }
}
@media (max-width: 360px) {
  .ssw__open span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ssw__img { transition: none; }
  .ssw__spin { animation-duration: 2s; }
}
