:root {
  --fondo: #f4f2ee;
  --carta: #ffffff;
  --inchiostro: #17171a;
  --tenue: #8b8a91;
  --linea: rgba(23, 23, 26, 0.08);
  --accento: #2f5bff;
  --ombra: 0 1px 1px rgba(23, 23, 26, 0.04), 0 10px 30px -12px rgba(23, 23, 26, 0.22);
  --larghezza: min(420px, calc(100vw - 32px));
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.palco {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 10px 16px;
}

.app {
  position: relative;
  width: var(--larghezza);
  padding: 14px;
  border-radius: 22px;
  background: var(--carta);
  box-shadow: var(--ombra), inset 0 0 0 1px var(--linea);
}

/* the head: name of the group and the bin */
.testa {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
}
.testa__icona {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: #eef1ff;
}
.testa__icona svg { width: 18px; height: 18px; fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; }
.testa__testi { display: grid; gap: 1px; line-height: 1.15; flex: 1; min-width: 0; }
.testa__testi strong { font-size: 14px; font-weight: 640; font-stretch: 105%; letter-spacing: -0.01em; }
.testa__testi span { font-size: 11px; color: var(--tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cestino {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #f3f2f0;
}
.cestino svg { width: 18px; height: 18px; fill: none; stroke: var(--inchiostro); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.cestino__numero {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--inchiostro);
  color: #fff;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  opacity: 0;
}

/* the photos */
.zona { position: relative; margin-top: 10px; }

.grande {
  position: relative;
  margin: 0 auto;
  height: min(40vh, calc((var(--larghezza) - 28px) * 0.625));
  aspect-ratio: 16 / 10;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #ebe8e3;
}
.grande::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 -40px 50px -30px rgba(10, 8, 30, 0.35);
  pointer-events: none;
}
.grande__strato { position: absolute; inset: 0; opacity: 0; }
.grande__luce {
  position: absolute; inset: -10% auto -10% 0;
  width: 45%;
  z-index: 2;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.28) 45%, rgba(255, 255, 255, 0.05) 60%, transparent 100%);
  transform: translateX(-120%) skewX(-12deg);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.scatto { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }

/* each shot gets its own flaw, on the photo inside its frame: the same picture, shaken, tilted, under- and overexposed */
[data-difetto="mosso"] .scatto { filter: blur(var(--mosso, 2.4px)); transform: scale(1.06); }
[data-difetto="storto"] .scatto { transform: rotate(-7deg) scale(1.2); }
[data-difetto="scuro"] .scatto { filter: brightness(0.5) saturate(0.8); }
[data-difetto="chiaro"] .scatto { filter: brightness(1.42) contrast(0.72) saturate(0.75); }

.etichetta {
  position: absolute;
  left: 10px; top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  opacity: 0;
  z-index: 3;
  box-shadow: 0 1px 2px rgba(20, 16, 40, 0.12);
}
.etichetta__segno { width: 14px; height: 14px; fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.etichetta.e-difetto .etichetta__segno { stroke: var(--tenue); }

.scritta { display: inline-block; will-change: transform; }

.fila {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 10px auto 0;
  width: min(100%, 330px);
}
.posto {
  position: relative;
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--linea);
  background: #faf9f7;
}
.posto__nome {
  position: absolute;
  left: 50%; top: 100%;
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--tenue);
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0;
}
.posto__nome--meglio { color: var(--accento); font-weight: 650; }

.carta {
  position: absolute;
  left: 0; top: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #ebe8e3;
  cursor: pointer;
  box-shadow: 0 0 0 2px #fff, 0 6px 16px -6px rgba(20, 16, 40, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.carta::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--accento);
  opacity: 0;
  transition: opacity .25s;
}
.carta.e-scelta::after { opacity: 1; }

.azione {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 2px;
  border: 0;
  border-radius: 999px;
  background: var(--inchiostro);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  font-stretch: 104%;
  cursor: pointer;
  overflow: hidden;
}
.azione[disabled] { cursor: default; }

.piede {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--tenue);
  overflow: hidden;
}
.spazio {
  position: relative;
  width: 64px; height: 4px;
  border-radius: 2px;
  background: #ecebe8;
  overflow: hidden;
}
.spazio__pieno {
  position: absolute; inset: 0 auto 0 0;
  width: 88%;
  border-radius: inherit;
  background: var(--inchiostro);
}

.puntatore {
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  fill: #111;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
}

@media (hover: hover) {
  .azione:hover { background: #2a2a30; }
}

@media (max-height: 470px) {
  .testa__testi span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .puntatore { display: none; }
}
