/* ============================================================
   Sito_Per_Maya · foglio di stile
   Tema scuro prugna/rosa · modificabile qui
   ============================================================ */


/* ───────────────────────────  Tema  ─────────────────────────── */

:root {
  --bg: #100b13;
  --surface: #1b111e;
  --surface-2: #241528;
  --pink: #f09bc2;
  --pink-deep: #d970a4;
  --pink-light: #ffd9e9;
  --text: #f8edf4;
  --muted: #bba9b8;
  --border: #43263c;
  --border-soft: rgba(255, 217, 233, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--pink-deep);
  color: #1c0d18;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #150d17;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6a3a5c;
}

/* ────────────────────  Cielo di sfondo  ──────────────────── */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -12%, #3b1a33 0%, transparent 62%),
    radial-gradient(ellipse 60% 45% at 92% 108%, #2c1226 0%, transparent 58%),
    radial-gradient(ellipse 55% 40% at 4% 68%, #241022 0%, transparent 55%);
}

/* stelle — lo stesso cielo per tutti e due */
.sky::before,
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}

.sky::before {
  background-image:
    radial-gradient(1.5px 1.5px at 15% 25%, #ffd9e966 50%, transparent 51%),
    radial-gradient(1px 1px at 40% 12%, #ffd9e94d 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 65% 30%, #ffd9e959 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 18%, #ffd9e940 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 55%, #ffd9e93d 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 62%, #ffd9e94f 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 80%, #ffd9e945 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 78%, #ffd9e942 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 88%, #ffd9e938 50%, transparent 51%);
}

.sky::after {
  background-image:
    radial-gradient(1.5px 1.5px at 22% 40%, #ffd9e95c 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 22%, #ffd9e94a 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 76% 45%, #ffd9e952 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 70%, #ffd9e940 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 60%, #ffd9e936 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 12% 58%, #ffd9e948 50%, transparent 51%);
  animation: scintillio 5.5s ease-in-out infinite alternate;
}

@keyframes scintillio {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}

/* ────────────────────  Cuoricini che cadono  ──────────────────── */

.hearts {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
}

.falling-heart {
  position: absolute;
  top: -30px;
  color: var(--pink);
  opacity: 0;
  text-shadow: 0 0 12px rgba(240, 155, 194, 0.35);
  animation: caduta linear forwards;
}

@keyframes caduta {
  0% {
    transform: translate3d(0, -5vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  85% {
    opacity: 0.32;
  }
  100% {
    transform: translate3d(38px, 110vh, 0) rotate(220deg);
    opacity: 0;
  }
}

/* ───────────────────────────  Topbar  ─────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 7%;
  background: rgba(16, 11, 19, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--pink-light);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 3px;
}

.logo-heart {
  color: var(--pink);
  font-size: 1.05rem;
  animation: battito 2.2s ease-in-out infinite;
}

.music-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: var(--pink-light);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 9px 17px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.4px;
  transition:
    border-color 0.25s,
    background 0.25s,
    transform 0.2s;
}

.music-button:hover {
  border-color: var(--pink);
  background: rgba(240, 155, 194, 0.08);
  transform: translateY(-1px);
}

.music-button.is-playing {
  border-color: var(--pink);
  background: rgba(240, 155, 194, 0.13);
}

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
}

.eq i {
  width: 3px;
  border-radius: 2px;
  background: var(--pink-light);
  animation: equalizer 0.85s ease-in-out infinite alternate;
}

.eq i:nth-child(1) {
  height: 6px;
  animation-delay: 0s;
}
.eq i:nth-child(2) {
  height: 11px;
  animation-delay: 0.22s;
}
.eq i:nth-child(3) {
  height: 8px;
  animation-delay: 0.44s;
}

@keyframes equalizer {
  from {
    transform: scaleY(0.35);
  }
  to {
    transform: scaleY(1);
  }
}

/* ───────────────────────────  Hero  ─────────────────────────── */

.hero {
  position: relative;
  z-index: 1;
  min-height: 84svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 22px 70px;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -54%;
  z-index: -1;
  font-size: clamp(16rem, 46vw, 30rem);
  line-height: 1;
  color: rgba(240, 155, 194, 0.05);
  user-select: none;
  animation: fluttua 11s ease-in-out infinite alternate;
}

@keyframes fluttua {
  from {
    transform: translateY(-10px) rotate(-3deg);
  }
  to {
    transform: translateY(14px) rotate(3deg);
  }
}

.eyebrow {
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  margin: 0;
}

h1 {
  font-size: clamp(3.1rem, 11vw, 6.8rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 20px 0 18px;
}

h1 span {
  display: block;
  margin-top: 8px;
  font-size: 0.6em;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--pink);
}

.intro,
.section-description {
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto;
  font-size: 1.02rem;
}

.badge-days {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 0;
  padding: 10px 19px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.badge-days:hover {
  border-color: var(--pink);
  box-shadow: 0 0 26px rgba(240, 155, 194, 0.14);
}

.badge-days span {
  color: var(--pink);
  animation: battito 1.8s ease-in-out infinite;
}

.badge-days strong {
  color: var(--pink-light);
  font-weight: 700;
}

.scroll-link {
  margin-top: 40px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--pink-light);
  font-size: 0.88rem;
  letter-spacing: 0.4px;
  opacity: 0.9;
  transition: opacity 0.25s;
}

.scroll-link:hover {
  opacity: 1;
}

.scroll-arrow {
  animation: su-e-giu 1.9s ease-in-out infinite;
}

@keyframes su-e-giu {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

/* battito: il doppio "tum-tum" del cuore */
@keyframes battito {
  0% {
    transform: scale(1);
  }
  12% {
    transform: scale(1.22);
  }
  24% {
    transform: scale(1);
  }
  36% {
    transform: scale(1.13);
  }
  48% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

/* ───────────────────────  Sezioni in generale  ─────────────────────── */

main,
footer {
  position: relative;
  z-index: 1;
}

.section {
  max-width: 880px;
  margin: auto;
  padding: 85px 22px;
  text-align: center;
}

.section h2 {
  font-size: clamp(1.9rem, 5.5vw, 2.9rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 12px 0 22px;
}

.section .eyebrow + h2 {
  margin-top: 12px;
}

.small-note {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 26px 0 0;
}

/* ───────────────────────  Distanza + meteo  ─────────────────────── */

.distance-card {
  display: grid;
  grid-template-columns: 1fr 0.9fr 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 32px 20px;
  background: linear-gradient(160deg, #20131f, #170e18);
  border: 1px solid var(--border);
  border-radius: 22px;
  transition:
    border-color 0.3s,
    transform 0.3s,
    box-shadow 0.3s;
}

.distance-card:hover {
  border-color: #6a3a5c;
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(24, 8, 20, 0.55);
}

.city h3 {
  margin: 10px 0 2px;
  font-size: 1.35rem;
  font-weight: 600;
}

.city p {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

.city-dot {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(240, 155, 194, 0.55);
}

.city-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(240, 155, 194, 0.45);
  animation: onda 2.4s ease-out infinite;
}

@keyframes onda {
  0% {
    transform: scale(0.55);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.weather {
  display: inline-block;
  margin-top: 11px;
  padding: 5px 13px;
  border: 1px solid rgba(240, 155, 194, 0.25);
  border-radius: 999px;
  background: rgba(240, 155, 194, 0.08);
  color: var(--pink-light);
  font-size: 0.78rem;
}

.route {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.route-km {
  color: var(--pink-light);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.route-line {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--pink) 0 8px,
    transparent 8px 16px
  );
  animation: trattini-oriz 1.2s linear infinite;
}

@keyframes trattini-oriz {
  to {
    background-position: 16px 0;
  }
}

.route-heart {
  color: var(--pink);
  font-size: 1.45rem;
  text-shadow: 0 0 18px rgba(240, 155, 194, 0.4);
  animation: battito 1.6s ease-in-out infinite;
}

/* ───────────────  Mappa vera (Leaflet, tipo Google Maps)  ─────────────── */

.mappa-frame {
  position: relative;
  max-width: 720px;
  height: 460px;
  margin: 32px auto 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: #160d18;
  box-shadow: 0 20px 60px rgba(24, 8, 20, 0.5);
  transition:
    border-color 0.35s,
    box-shadow 0.35s;
}

.mappa-frame:hover {
  border-color: #6a3a5c;
  box-shadow: 0 26px 70px rgba(24, 8, 20, 0.65);
}

#mappa {
  width: 100%;
  height: 100%;
}

.leaflet-container {
  background: #160d18;
  font-family: var(--font-body);
}

/* rotta tratteggiata che cammina */
.route-path {
  animation: trattini-mappa 1.3s linear infinite;
}

@keyframes trattini-mappa {
  to {
    stroke-dashoffset: -34;
  }
}

/* marker a cuoricino */
.pin-cuore-wrap {
  background: none;
  border: none;
}

.pin-cuore {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6b9d4, #d970a4);
  border: 2.5px solid #ffd9e9;
  color: #341428;
  font-size: 16px;
  box-shadow: 0 0 18px rgba(240, 155, 194, 0.65);
}

.pin-cuore::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(240, 155, 194, 0.55);
  animation: pinonda 2.4s ease-out infinite;
}

@keyframes pinonda {
  0% {
    transform: scale(0.55);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.pin-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--pink);
  font-size: 15px;
  text-shadow: 0 0 10px rgba(240, 155, 194, 0.8);
  animation: battito 1.6s ease-in-out infinite;
}

/* targhetta col nome della città */
.pink-tooltip {
  background: rgba(16, 11, 19, 0.92);
  color: var(--pink-light);
  border: 1px solid #6a3a5c;
  border-radius: 10px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  box-shadow: 0 8px 24px rgba(16, 11, 19, 0.6);
}

.pink-tooltip strong {
  display: block;
  letter-spacing: 0.4px;
}

.pink-tooltip em {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
}

.pink-tooltip::before {
  border-top-color: #6a3a5c;
}

/* cambio vista mappa/satellite */
.mappa-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1100;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(16, 11, 19, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mappa-toggle button {
  padding: 6px 13px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  transition:
    background 0.25s,
    color 0.25s;
}

.mappa-toggle button:hover {
  color: var(--pink-light);
}

.mappa-toggle button.active {
  background: linear-gradient(135deg, #f3a8cb, #d970a4);
  color: #341428;
  font-weight: 700;
}

/* velo mentre la mappa si carica */
.mappa-caricamento {
  position: absolute;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(16, 11, 19, 0.82);
  color: var(--pink-light);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  animation: dissolvi 0.3s ease;
}

.mappa-caricamento span {
  color: var(--pink);
  font-size: 1.3rem;
  animation: battito 1.4s ease-in-out infinite;
}

/* comandi della mappa in tema col sito */
.leaflet-bar a {
  background: rgba(16, 11, 19, 0.92);
  color: var(--pink-light);
  border-color: var(--border);
}

.leaflet-bar a:hover {
  background: #35203a;
  color: var(--pink-light);
}

.leaflet-control-attribution {
  background: rgba(16, 11, 19, 0.8);
  color: #8a7584;
  font-size: 0.62rem;
}

.leaflet-control-attribution a {
  color: #d9a7c0;
}

.leaflet-control-scale-line {
  background: rgba(16, 11, 19, 0.75);
  color: var(--muted);
  border-color: #6a3a5c;
  font-size: 0.64rem;
}

/* ───────────────  Portale del cassetto segreto  ─────────────── */

.portale-card {
  display: block;
  max-width: 520px;
  margin: 32px auto 0;
  padding: 44px 30px 36px;
  border: 1px dashed #86516e;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(240, 155, 194, 0.07), transparent 65%),
    rgba(27, 17, 30, 0.55);
  text-align: center;
  transition:
    border-color 0.35s,
    transform 0.3s,
    box-shadow 0.35s;
}

.portale-card:hover {
  border-color: var(--pink);
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(240, 155, 194, 0.14);
}

.portale-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  color: var(--pink);
  background: rgba(240, 155, 194, 0.09);
  border: 1px solid rgba(240, 155, 194, 0.35);
  box-shadow: 0 0 34px rgba(240, 155, 194, 0.18);
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.portale-card:hover .portale-lock {
  transform: scale(1.08) rotate(-4deg);
}

.portale-title {
  margin: 18px 0 8px;
  font-size: 1.6rem;
  font-weight: 600;
}

.portale-text {
  margin: 0 auto;
  max-width: 380px;
  color: var(--muted);
  font-size: 0.9rem;
}

.portale-enter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3a8cb, #d970a4);
  color: #341428;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(233, 130, 181, 0.26);
  transition: box-shadow 0.25s, transform 0.2s;
}

.portale-card:hover .portale-enter {
  box-shadow: 0 14px 40px rgba(233, 130, 181, 0.42);
  transform: translateY(-1px);
}

.torna-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.85rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}

.torna-link:hover {
  color: var(--pink-light);
  border-color: var(--pink);
}

/* ─────────────────────────  Countdown  ───────────────────────── */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.time-box {
  padding: 24px 6px 18px;
  background: linear-gradient(180deg, #20131f, #170e18);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition:
    border-color 0.3s,
    transform 0.3s,
    box-shadow 0.3s;
}

.time-box:hover {
  border-color: var(--pink);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(240, 155, 194, 0.12);
}

.time-box strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 7vw, 3rem);
  line-height: 1;
  color: var(--pink-light);
  text-shadow: 0 0 28px rgba(240, 155, 194, 0.2);
}

.time-box span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.tick {
  animation: ticchetto 0.35s ease;
}

@keyframes ticchetto {
  from {
    opacity: 0.15;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────  Frase del giorno  ───────────────────── */

.daily-section {
  background: rgba(27, 17, 30, 0.55);
  border-block: 1px solid var(--border-soft);
}

.big-heart {
  display: block;
  color: var(--pink);
  font-size: 3rem;
  text-shadow: 0 0 30px rgba(240, 155, 194, 0.4);
  animation: battito 1.8s ease-in-out infinite;
}

.daily-message {
  max-width: 660px;
  margin: 14px auto 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  line-height: 1.5;
  color: var(--pink-light);
}

/* ─────────────────────────  Timeline  ───────────────────────── */

.timeline {
  position: relative;
  text-align: left;
  max-width: 560px;
  margin: 42px auto 0;
  padding-left: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 34px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    #6a3a5c 10%,
    #6a3a5c 90%,
    transparent
  );
}

.timeline-item {
  position: relative;
  padding-bottom: 34px;
  transition: transform 0.3s ease;
}

.timeline-item:hover {
  transform: translateX(6px);
}

.timeline-item:hover h3 {
  color: var(--pink-light);
}

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow:
    0 0 0 4px rgba(240, 155, 194, 0.16),
    0 0 14px rgba(240, 155, 194, 0.45);
}

.timeline-label {
  margin: 0 0 5px;
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.timeline-item h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 600;
  transition: color 0.3s;
}

.timeline-date {
  display: inline-block;
  margin: 0 0 9px;
  padding: 3px 12px;
  border: 1px solid rgba(240, 155, 194, 0.25);
  border-radius: 999px;
  background: rgba(240, 155, 194, 0.08);
  color: var(--pink-light);
  font-size: 0.78rem;
}

.timeline-item p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ─────────────────────  Cornice della foto  ───────────────────── */

.photo-placeholder {
  position: relative;
  margin-top: 34px;
  padding: 62px 24px;
  border: 1.5px dashed #86516e;
  border-radius: 22px;
  background: rgba(27, 17, 30, 0.5);
  transition: border-color 0.35s;
}

.photo-placeholder:hover {
  border-color: var(--pink);
}

.photo-placeholder:hover .placeholder-heart {
  transform: scale(1.18) rotate(-7deg);
}

.placeholder-heart {
  display: block;
  color: var(--pink);
  font-size: 3rem;
  text-shadow: 0 0 26px rgba(240, 155, 194, 0.35);
  transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.photo-placeholder h3 {
  margin: 12px 0 6px;
  font-size: 1.6rem;
  font-weight: 600;
}

.photo-placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.photo-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--pink);
  opacity: 0.45;
}

.photo-corner--tl {
  top: 10px;
  left: 10px;
  border-top-width: 2px;
  border-left-width: 2px;
}
.photo-corner--tr {
  top: 10px;
  right: 10px;
  border-top-width: 2px;
  border-right-width: 2px;
}
.photo-corner--bl {
  bottom: 10px;
  left: 10px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}
.photo-corner--br {
  bottom: 10px;
  right: 10px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

/* ─────────────────────────  La lettera  ───────────────────────── */

.love-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  background: linear-gradient(135deg, #f3a8cb, #d970a4);
  color: #341428;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 34px rgba(233, 130, 181, 0.28);
  transition:
    transform 0.2s,
    box-shadow 0.25s,
    filter 0.25s;
}

.love-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 46px rgba(233, 130, 181, 0.42);
  filter: brightness(1.05);
}

.love-button:active {
  transform: scale(0.97);
  filter: brightness(1.1);
}

.letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(12, 7, 14, 0.8);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: dissolvi 0.25s ease;
}

@keyframes dissolvi {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.letter-paper {
  position: relative;
  width: min(620px, 100%);
  max-height: 84vh;
  overflow: auto;
  padding: 48px 42px 36px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      transparent 0 31px,
      rgba(160, 110, 90, 0.16) 31px 32px
    ),
    linear-gradient(175deg, #f9efe1, #f3e2cd);
  color: #4a2438;
  box-shadow: 0 34px 90px rgba(8, 4, 10, 0.6);
  transform: rotate(-0.4deg);
  animation: cartain 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

@keyframes cartain {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(-1.5deg) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-0.4deg) scale(1);
  }
}

.letter-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  color: rgba(124, 45, 82, 0.55);
  font-size: 1rem;
  padding: 8px;
  transition: color 0.25s;
}

.letter-close:hover {
  color: #7c2d52;
}

.wax-seal {
  position: absolute;
  top: 16px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e287b0, #b04a7d 72%);
  color: var(--pink-light);
  font-size: 1.25rem;
  transform: rotate(-9deg);
  box-shadow:
    0 6px 18px rgba(8, 4, 10, 0.35),
    inset 0 -2px 6px rgba(74, 36, 56, 0.35);
}

.letter-title {
  margin: 34px 0 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.65rem;
  color: #7c2d52;
}

.letter-text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.16rem;
  line-height: 32px;
  white-space: pre-line;
  min-height: 32px;
}

.cursor {
  color: #c25a8d;
  animation: lampeggia 0.8s steps(1) infinite;
}

@keyframes lampeggia {
  50% {
    opacity: 0;
  }
}

.signature {
  display: block;
  margin-top: 26px;
  text-align: right;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  color: #7c2d52;
}

/* ───────────────────────────  Footer  ─────────────────────────── */

footer {
  border-top: 1px solid var(--border-soft);
  padding: 46px 20px 42px;
  text-align: center;
  color: var(--pink-light);
  font-size: 0.92rem;
}

footer p {
  margin: 0;
}

.footer-heart {
  color: var(--pink);
  font-size: 1.35rem;
  margin-bottom: 10px;
  animation: battito 2s ease-in-out infinite;
}

.footer-small {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
}

.footer-links span {
  color: #6f5a6a;
}

.footer-links a {
  color: var(--muted);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 1px;
  transition: color 0.25s, border-color 0.25s;
}

.footer-links a:hover {
  color: var(--pink-light);
  border-color: var(--pink);
}

/* ───────────────  Animazioni di comparsa (scroll)  ─────────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ─────────────────────────  Responsive  ───────────────────────── */

@media (max-width: 700px) {
  .section {
    padding: 62px 18px;
  }

  .hero {
    min-height: 76svh;
    padding: 64px 20px 56px;
  }

  .topbar {
    padding: 13px 5%;
  }

  .distance-card {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 26px 18px;
  }

  .route-line {
    width: 2px;
    height: 46px;
    background: repeating-linear-gradient(
      180deg,
      var(--pink) 0 8px,
      transparent 8px 16px
    );
    animation: trattini-vert 1.2s linear infinite;
  }

  .mappa-frame {
    height: 320px;
  }

  .countdown {
    gap: 7px;
  }

  .time-box {
    padding: 16px 2px 13px;
  }

  .time-box span {
    font-size: 0.62rem;
    letter-spacing: 1px;
  }

  .letter-paper {
    padding: 44px 24px 28px;
  }
}

@keyframes trattini-vert {
  to {
    background-position: 0 16px;
  }
}

/* ───────────  Banner "crea la vostra storia" (demo)  ─────────── */

.demo-corner {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.demo-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid rgba(232, 195, 158, 0.45);
  border-radius: 999px;
  background: rgba(232, 195, 158, 0.08);
  color: #e8c39e;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  transition:
    box-shadow 0.3s,
    transform 0.2s,
    background 0.3s;
}

.demo-banner:hover {
  box-shadow: 0 0 30px rgba(232, 195, 158, 0.2);
  transform: translateY(-2px);
  background: rgba(232, 195, 158, 0.13);
}

.codice-box {
  width: min(430px, 100%);
}

.codice-box summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  list-style: none;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 3px;
  transition: color 0.25s;
}

.codice-box summary::-webkit-details-marker {
  display: none;
}

.codice-box summary:hover {
  color: var(--pink-light);
}

.codice-box .share-row {
  margin-top: 12px;
}

.codice-box .errore-toast {
  margin-top: 10px;
}

/* ───────────────  Percorso "Crea la vostra storia"  ─────────────── */

.wizard {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.wizard-card {
  width: min(660px, 100%);
  margin: 0 auto;
  padding: 54px 22px 90px;
  text-align: center;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.step-heart {
  font-size: 1.25rem;
  color: #3a2136;
  transition:
    color 0.35s,
    transform 0.35s;
}

.step-heart.done {
  color: var(--pink-deep);
}

.step-heart.current {
  color: var(--pink-light);
  transform: scale(1.3);
  animation: battito 1.6s ease-in-out infinite;
  text-shadow: 0 0 16px rgba(240, 155, 194, 0.5);
}

.step-name {
  margin: 12px 0 26px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.wizard-title {
  font-size: clamp(1.8rem, 5.5vw, 2.7rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 12px;
}

.wizard-sub {
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto 30px;
  font-size: 0.95rem;
}

.coppia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  text-align: left;
}

.field {
  text-align: left;
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--pink);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: #170e18;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(240, 155, 194, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.65;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6f5a6a;
}

.field .suggerimento {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

/* date input: calendarietto coerente col tema */
.field input[type="date"] {
  color-scheme: dark;
}

.wizard-error {
  margin: 20px auto 0;
  max-width: 460px;
  padding: 11px 18px;
  border: 1px solid rgba(224, 110, 140, 0.35);
  border-radius: 12px;
  background: rgba(224, 110, 140, 0.1);
  color: #edaebb;
  font-size: 0.88rem;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  transition:
    border-color 0.25s,
    color 0.25s,
    transform 0.2s;
}

.btn-ghost:hover {
  border-color: var(--pink);
  color: var(--pink-light);
  transform: translateY(-1px);
}

.btn-ghost--small {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-ghost:disabled,
.love-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.fatto-heart {
  display: block;
  margin-bottom: 8px;
  color: var(--pink);
  font-size: 3.4rem;
  text-shadow: 0 0 34px rgba(240, 155, 194, 0.5);
  animation: battito 1.6s ease-in-out infinite;
}

.fatto-vs {
  color: var(--pink);
}

.share-box {
  text-align: left;
  margin-top: 24px;
  padding: 20px 22px;
  background: linear-gradient(160deg, #20131f, #170e18);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.share-box h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--pink-light);
}

.share-box p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.share-row {
  display: flex;
  gap: 8px;
}

.share-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: #140c15;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--font-body);
}

.share-row input.share-code {
  font-size: 0.68rem;
  word-break: break-all;
}

.copy-button {
  flex-shrink: 0;
  padding: 10px 17px;
  border: 1px solid var(--pink);
  border-radius: 10px;
  background: rgba(240, 155, 194, 0.1);
  color: var(--pink-light);
  font-size: 0.82rem;
  font-weight: 600;
  transition:
    background 0.25s,
    border-color 0.25s,
    color 0.25s;
}

.copy-button:hover {
  background: rgba(240, 155, 194, 0.22);
}

.copy-button.copied {
  background: rgba(125, 217, 138, 0.15);
  border-color: #7dd98a;
  color: #b9ecc2;
}

.wizard-nota {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ─────────────────  Sezione privata (+18) e abbracci  ───────────────── */

.gate-card {
  max-width: 520px;
  margin: 32px auto 0;
  padding: 38px 28px;
  border: 1px dashed #86516e;
  border-radius: 22px;
  background: rgba(27, 17, 30, 0.55);
}

.gate-emoji {
  display: block;
  margin-bottom: 10px;
  font-size: 2.6rem;
}

.gate-title {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 600;
}

.gate-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin: 24px auto 0;
}

.gate-input {
  width: 100%;
  padding: 13px 16px;
  background: #170e18;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 2px;
  text-align: center;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}

.gate-input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(240, 155, 194, 0.15);
}

.gate-input::placeholder {
  color: #6f5a6a;
  letter-spacing: 0.5px;
}

.gate-errore {
  margin: 4px 0 0;
  color: #edaebb;
  font-size: 0.86rem;
}

.gate-hint {
  margin: 16px auto 0;
  max-width: 340px;
  color: #8a7584;
  font-size: 0.76rem;
}

.gate-shake {
  animation: scuoti 0.45s ease;
}

@keyframes scuoti {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-9px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(4px);
  }
}

/* ── cambio password dentro il cassetto ── */

.drawer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}

.pw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  transition:
    border-color 0.25s,
    color 0.25s;
}

.pw-toggle:hover {
  border-color: var(--pink);
  color: var(--pink-light);
}

.pw-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto 26px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(27, 17, 30, 0.55);
  animation: dissolvi 0.25s ease;
}

.pw-form .gate-input {
  padding: 11px 14px;
  font-size: 0.9rem;
}

.pw-ok {
  color: #b9ecc2;
  font-size: 0.85rem;
}

.abbracci-wrap {
  max-width: 560px;
  margin: 34px auto 0;
}

.who-picker {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 22px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(27, 17, 30, 0.6);
}

.who-pill {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.2s;
}

.who-pill:hover {
  color: var(--pink-light);
}

.who-pill.active {
  background: linear-gradient(135deg, #f3a8cb, #d970a4);
  color: #341428;
  font-weight: 700;
}

.abbracci-target {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.abbracci-target strong {
  color: var(--pink-light);
}

.abbracci-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.abbraccio-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 24px 10px 20px;
  background: linear-gradient(180deg, #20131f, #170e18);
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  transition:
    transform 0.2s,
    border-color 0.25s,
    box-shadow 0.25s;
}

.abbraccio-btn:hover {
  transform: translateY(-4px);
  border-color: var(--pink);
  box-shadow: 0 16px 38px rgba(240, 155, 194, 0.16);
}

.abbraccio-btn:active {
  transform: scale(0.95);
}

.abbraccio-emoji {
  font-size: 2.1rem;
  transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.abbraccio-btn:hover .abbraccio-emoji {
  transform: scale(1.28) rotate(-8deg);
}

.abbraccio-label {
  color: var(--pink-light);
  font-size: 0.9rem;
  font-weight: 700;
}

.abbraccio-sub {
  color: var(--muted);
  font-size: 0.74rem;
}

.inviato-toast,
.errore-toast {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 19px;
  border-radius: 999px;
  font-size: 0.85rem;
  animation: ticchetto 0.35s ease;
}

.inviato-toast {
  color: #b9ecc2;
  background: rgba(125, 217, 138, 0.12);
  border: 1px solid rgba(125, 217, 138, 0.35);
}

.errore-toast {
  color: #edaebb;
  background: rgba(224, 110, 140, 0.12);
  border: 1px solid rgba(224, 110, 140, 0.35);
}

.abbracci-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e8c39e;
}

.status-dot.online {
  background: #7dd98a;
  box-shadow: 0 0 10px rgba(125, 217, 138, 0.65);
}

.status-dot.offline {
  background: #e08a9a;
}

.status-dot.connessione {
  animation: lampeggia 1s steps(1) infinite;
}

.contatore strong {
  color: var(--pink-light);
}

.abbracci-nota {
  max-width: 400px;
  color: #8a7584;
  font-size: 0.76rem;
}

/* ───────────────  Esplosione quando arriva un abbraccio  ─────────────── */

.burst-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(12, 7, 14, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  animation: dissolvi 0.3s ease;
}

.burst-card {
  position: relative;
  text-align: center;
  padding: 30px 20px;
}

.burst-emoji {
  display: block;
  font-size: clamp(4rem, 16vw, 6.5rem);
  animation: burst-in 0.55s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes burst-in {
  from {
    transform: scale(0.15) rotate(-14deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.burst-title {
  margin: 16px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6vw, 2.7rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--pink-light);
}

.burst-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.burst-hint {
  margin: 30px 0 0;
  color: #8a7584;
  font-size: 0.76rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.burst-hearts span {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: -1;
  font-size: var(--size, 18px);
  color: var(--pink);
  text-shadow: 0 0 14px rgba(240, 155, 194, 0.55);
  opacity: 0;
  animation: scoppio var(--dur, 1.4s) ease-out forwards;
}

@keyframes scoppio {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -120px)))
      scale(1.15) rotate(var(--rot, 40deg));
    opacity: 0;
  }
}

/* ───────────────────────────  Topbar: azioni  ─────────────────────────── */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.share-button {
  padding: 9px 15px;
  border: 1px solid rgba(232, 195, 158, 0.5);
  border-radius: 30px;
  background: rgba(232, 195, 158, 0.08);
  color: #e8c39e;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  transition:
    background 0.25s,
    transform 0.2s,
    box-shadow 0.25s;
}

.share-button:hover {
  background: rgba(232, 195, 158, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(232, 195, 158, 0.18);
}

/* ───────────────────────  Responsive (nuove parti)  ─────────────────────── */

@media (max-width: 620px) {
  .coppia-grid {
    grid-template-columns: 1fr;
  }

  .abbracci-grid {
    grid-template-columns: 1fr;
  }

  .abbraccio-btn {
    flex-direction: row;
    justify-content: flex-start;
    padding: 15px 18px;
    gap: 14px;
  }

  .abbraccio-btn:hover .abbraccio-emoji {
    transform: scale(1.15);
  }

  .abbraccio-emoji {
    font-size: 1.7rem;
  }

  .abbracci-sub {
    display: none;
  }

  .who-pill {
    padding: 7px 13px;
    font-size: 0.8rem;
  }

  .share-row {
    flex-direction: column;
  }

  .topbar-actions {
    gap: 6px;
  }

  .music-button {
    padding: 8px 12px;
    font-size: 0.76rem;
  }

  .share-button {
    padding: 8px 11px;
    font-size: 0.74rem;
  }
}

/* ─────────────────  Il cassetto segreto (+18)  ───────────────── */

.zona-wrap {
  max-width: 640px;
  margin: 34px auto 0;
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(27, 17, 30, 0.6);
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 17px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.2s;
}

.tab-pill:hover {
  color: var(--pink-light);
}

.tab-pill.active {
  background: linear-gradient(135deg, #f3a8cb, #d970a4);
  color: #341428;
  font-weight: 700;
}

.tab-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(16, 11, 19, 0.25);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.tab-pill:not(.active) .tab-count {
  background: rgba(240, 155, 194, 0.12);
  color: var(--pink-light);
}

/* ── polaroid ── */

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
  align-items: start;
}

.polaroid {
  position: relative;
  padding: 9px 9px 32px;
  border: none;
  border-radius: 4px;
  background: linear-gradient(175deg, #f9efe1, #f1e0c8);
  box-shadow: 0 10px 26px rgba(8, 4, 10, 0.45);
  cursor: pointer;
  transform: rotate(-1.6deg);
  transition:
    transform 0.35s cubic-bezier(0.3, 1.3, 0.5, 1),
    box-shadow 0.35s;
}

.polaroid:nth-child(odd) {
  transform: rotate(1.8deg);
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 18px 44px rgba(8, 4, 10, 0.6);
  z-index: 2;
}

.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  background: #d9c3ab;
}

.polaroid-data {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.82rem;
  color: #6b4152;
}

.add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1.5px dashed #86516e;
  border-radius: 12px;
  background: rgba(27, 17, 30, 0.4);
  color: var(--muted);
  font-size: 0.86rem;
  transition:
    border-color 0.3s,
    color 0.3s,
    transform 0.2s,
    box-shadow 0.3s;
}

.add-card:hover:not(:disabled) {
  border-color: var(--pink);
  color: var(--pink-light);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(240, 155, 194, 0.14);
}

.add-card:disabled {
  opacity: 0.6;
  cursor: wait;
}

.add-plus {
  font-size: 2rem;
  line-height: 1;
  color: var(--pink);
}

.add-card--video {
  min-height: 120px;
}

/* ── video ── */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}

.video-card {
  padding: 10px;
  background: linear-gradient(180deg, #20131f, #170e18);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.3s;
}

.video-card:hover {
  border-color: #6a3a5c;
}

.video-card video {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: #0d0710;
  max-height: 260px;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-delete {
  padding: 5px 13px;
  border: 1px solid rgba(224, 110, 140, 0.4);
  border-radius: 999px;
  background: transparent;
  color: #edaebb;
  font-size: 0.74rem;
  transition:
    background 0.25s,
    border-color 0.25s;
}

.mini-delete:hover {
  background: rgba(224, 110, 140, 0.14);
  border-color: #e06e8c;
}

/* ── letterine ── */

.letterine {
  max-width: 520px;
  margin: 0 auto;
}

.letterine-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.letterina-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  padding: 20px 18px 14px;
  border: none;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      transparent 0 25px,
      rgba(160, 110, 90, 0.14) 25px 26px
    ),
    linear-gradient(175deg, #f9efe1, #f1e0c8);
  box-shadow: 0 10px 26px rgba(8, 4, 10, 0.45);
  cursor: pointer;
  transform: rotate(-1.2deg);
  transition:
    transform 0.35s cubic-bezier(0.3, 1.3, 0.5, 1),
    box-shadow 0.35s;
}

.letterina-card:nth-child(even) {
  transform: rotate(1.4deg);
}

.letterina-card:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 0 18px 44px rgba(8, 4, 10, 0.6);
  z-index: 2;
}

.letterina-testo {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 26px;
  color: #4a2438;
}

.letterina-data {
  align-self: flex-end;
  font-size: 0.74rem;
  color: #a06a80;
}

.paper-actions {
  margin-top: 18px;
  text-align: center;
}

.vuoto {
  margin-top: 22px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}

.storage-note {
  margin-top: 26px;
  color: #8a7584;
  font-size: 0.76rem;
}

/* ── lightbox foto ── */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(12, 7, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: dissolvi 0.25s ease;
  cursor: pointer;
}

.lightbox-figure {
  margin: 0;
  max-width: min(760px, 100%);
  padding: 14px 14px 12px;
  border-radius: 6px;
  background: linear-gradient(175deg, #f9efe1, #f1e0c8);
  box-shadow: 0 34px 90px rgba(8, 4, 10, 0.65);
  transform: rotate(-0.6deg);
  animation: cartain 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  cursor: default;
}

.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  margin: 0 auto;
  border-radius: 3px;
}

.lightbox-figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.lightbox-data {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: #6b4152;
}

/* ─────────────  Chi preferisce meno animazioni  ───────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Extra per la versione statica
   ============================================================ */

[hidden] {
  display: none !important;
}

.tab-panel {
  animation: dissolvi 0.25s ease;
}

/* link "torna al sito" e piccoli aggiustamenti */
.topbar-actions .share-button {
  text-decoration: none;
}

@media (max-width: 620px) {
  .topbar-actions .share-button {
    padding: 8px 11px;
    font-size: 0.74rem;
  }
}
