/* ==========================================================
   Invito 18 anni — Mariantonia
   ========================================================== */
:root {
  --ink: #6a3c33;
  --ink-strong: #532a22;
  --line: rgba(120, 62, 50, .5);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Great Vibes", "Pinyon Script", cursive;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #1d1d20;
  color: var(--ink);
  font-family: var(--serif);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; user-select: text; -webkit-user-select: text; }

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #f0d8cf;
}

#fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
}

/* ---------- scene ---------- */
.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
}
.scene.is-active { visibility: visible; opacity: 1; }

/* ==========================================================
   SCENA 1 — BUSTA
   ========================================================== */
#intro { z-index: 2; cursor: pointer; }

/* ---------- video della busta ---------- */
#intro { background: #efd9cf; }
.vid-fill {
  position: absolute;
  left: -8%;
  top: -8%;
  width: 116%;
  height: 116%;
  filter: blur(24px) saturate(1.05);
  opacity: 0;
}
.vid {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 51% 55%;
  pointer-events: none;
}
.vid-poster { transition: opacity .3s ease; }
#intro.is-playing .vid-poster { opacity: 0; }
/* schermi verticali: video più grande del 55% della larghezza, sopra e sotto un riempimento sfocato */
@media (max-aspect-ratio: 4/3) {
  .vid-fill { opacity: 1; }
  .vid {
    left: 50%;
    top: 50%;
    width: 180vw;
    height: calc(180vw * 9 / 16);
    transform: translate(-50%, -50%);
    -webkit-mask: linear-gradient(180deg, transparent 0, #000 13%, #000 87%, transparent 100%);
    mask: linear-gradient(180deg, transparent 0, #000 13%, #000 87%, transparent 100%);
  }
}
#intro:not(.is-ready) .tap-btn { opacity: 0; }

/* palloncini rosa nello sfondo dell'invito */
.balloon {
  --u: min(1vw, 1vh, 9px);
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--s) * var(--u) * 1.15);
  height: auto;
  aspect-ratio: 100 / 170;
  overflow: visible;
  filter: drop-shadow(0 calc(var(--s) * var(--u) * .12) calc(var(--s) * var(--u) * .14) rgba(140, 70, 60, .22));
  transform-origin: 50% 70%;
  animation: balloonFloat var(--d) ease-in-out infinite;
}
.balloon.b-far { filter: blur(1.2px) drop-shadow(0 6px 8px rgba(140, 70, 60, .16)); opacity: .9; }
@keyframes balloonFloat {
  0%, 100% { transform: translateY(0) rotate(var(--r)); }
  50% { transform: translateY(calc(var(--s) * var(--u) * -.22)) rotate(calc(var(--r) * -.4)); }
}
@media (orientation: portrait) {
  .balloon { --u: min(.85vw, 7px); left: var(--px, var(--x)); top: var(--py, var(--y)); }
}

/* perle e sfere della scena invito (sfere vere ritagliate dalla foto) */
.pearl, .cball { position: absolute; left: var(--x); top: var(--y); }
.pearl {
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 7%, #fbf1ee 16%, #ecd6cf 40%, #c9a79d 70%, #a8857c 88%, #dcc1b8 100%);
  box-shadow:
    0 calc(var(--s) * .16) calc(var(--s) * .32) rgba(55, 48, 40, .32),
    inset calc(var(--s) * -.06) calc(var(--s) * -.08) calc(var(--s) * .14) rgba(120, 110, 98, .25);
}
.cball {
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: url("assets/img/ballA.webp") center / 100% 100% no-repeat;
  box-shadow: 0 calc(var(--s) * .14) calc(var(--s) * .26) rgba(30, 30, 34, .3);
}
.cball:nth-child(2n) { background-image: url("assets/img/ballF.webp"); }
.cball { filter: sepia(.55) saturate(1.45) hue-rotate(-16deg) brightness(1.04); }
.cball:nth-child(3n) { background-image: url("assets/img/ballC.webp"); }

/* pulsante "tocca per aprire" */
.tap-btn {
  position: absolute;
  left: 50%;
  bottom: calc(7dvh + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 11px 26px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #5a2f28;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .32em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 6px 22px rgba(60, 52, 44, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: tapPulse 2.4s ease-in-out infinite;
  transition: opacity .4s, transform .4s;
  z-index: 3;
}
.tap-btn span { padding-left: .32em; }
@keyframes tapPulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(60, 52, 44, .18), 0 0 0 0 rgba(255, 255, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .8); }
  60% { box-shadow: 0 6px 22px rgba(60, 52, 44, .18), 0 0 0 12px rgba(255, 255, 255, 0), inset 0 1px 0 rgba(255, 255, 255, .8); }
}
#intro.is-opening .tap-btn { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }

/* ---------- flash ---------- */
.flash {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, #fffaf4 0%, #fbefe4 45%, #f2e3d8 100%);
  opacity: 0;
  transition: opacity .75s ease-in;
}
.flash.is-on { opacity: 1; }
.flash.is-fading { transition: opacity 1.3s ease-out; }

/* ==========================================================
   SCENA 2 — INVITO
   ========================================================== */
#invite { z-index: 1; perspective: 1200px; }

.glam-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% 40%, rgba(255, 246, 242, .78) 0%, rgba(252, 234, 227, .35) 45%, rgba(252, 234, 227, 0) 75%),
    url("assets/img/invito-sfondo.jpg") center / cover no-repeat,
    #efd3c9;
}
.glam-bg > i { position: absolute; display: block; }

.rays {
  left: -60%;
  right: -60%;
  top: -30%;
  height: 160%;
  transform-origin: 50% 12%;
  background:
    repeating-conic-gradient(from 180deg at 50% 12%,
      rgba(255, 255, 255, 0) 0deg 5deg,
      rgba(255, 255, 255, .75) 6.2deg,
      rgba(255, 255, 255, 0) 7.6deg 12deg,
      rgba(255, 255, 255, .35) 13deg,
      rgba(255, 255, 255, 0) 14.4deg 19deg);
  filter: blur(1.5px);
  mix-blend-mode: soft-light;
  opacity: .95;
  animation: raySway 14s ease-in-out infinite alternate;
}
@keyframes raySway {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}


.floor {
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background:
    radial-gradient(ellipse 45% 30% at 50% 18%, rgba(255, 247, 243, .85), rgba(255, 247, 243, 0) 70%),
    linear-gradient(180deg, rgba(255, 240, 235, 0), rgba(253, 236, 230, .85) 20%, #ecd0c6 55%, #e0bcb0 100%);
  -webkit-mask: linear-gradient(180deg, transparent, #000 25%);
  mask: linear-gradient(180deg, transparent, #000 25%);
}

/* ---------- targa in acrilico ---------- */
.plaque {
  --pw: min(80vw, 360px, 47dvh);
  position: relative;
  width: var(--pw);
  min-height: calc(var(--pw) * 1.72);
  border-radius: 6px;
  padding: calc(var(--pw) * .07) calc(var(--pw) * .06) calc(var(--pw) * .06);
  display: grid;
  align-content: center;
  background:
    linear-gradient(158deg, rgba(255, 251, 249, .9) 0%, rgba(255, 246, 242, .78) 30%, rgba(255, 242, 238, .72) 60%, rgba(255, 248, 245, .86) 100%);
  backdrop-filter: blur(5px) saturate(1.15);
  -webkit-backdrop-filter: blur(5px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow:
    inset 0 0 0 1px rgba(200, 145, 132, .35),
    inset 0 0 0 7px rgba(255, 255, 255, .22),
    inset 0 0 38px rgba(255, 255, 255, .7),
    inset 0 -18px 30px rgba(170, 172, 180, .18),
    5px 7px 0 -1px rgba(255, 246, 243, .6),
    5px 7px 0 0 rgba(190, 135, 122, .3),
    0 30px 60px rgba(120, 60, 50, .22),
    0 8px 18px rgba(120, 60, 50, .14);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out);
  z-index: 2;
}
#invite.is-active .plaque { animation: plaqueIn 1.6s var(--ease-out) both; }
@keyframes plaqueIn {
  from { opacity: 0; transform: translateY(26px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.plaque > i { position: absolute; pointer-events: none; display: block; }
.plaque-frame {
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(195, 140, 128, .2), 0 0 0 1px rgba(195, 140, 128, .14);
}
.plaque-shine {
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}
.plaque-shine::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 45%;
  left: -60%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55) 45%, rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, .55) 55%, rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: sweep 7s ease-in-out 2s infinite;
}
@keyframes sweep {
  0% { left: -60%; }
  35%, 100% { left: 130%; }
}
.plaque-beams {
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(62deg, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, .5) 49.5%, rgba(255, 255, 255, .8) 50%, rgba(255, 255, 255, .5) 50.5%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(-58deg, rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, .35) 49%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, .35) 51%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(20deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .25) 33%, rgba(255, 255, 255, 0) 36%);
  mix-blend-mode: soft-light;
  opacity: .45;
  animation: beams 9s ease-in-out infinite alternate;
}
@keyframes beams { from { opacity: .25; } to { opacity: .5; } }

.twinkle {
  left: var(--x);
  top: var(--y);
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  background:
    radial-gradient(circle, #fff 0 1.5px, rgba(255, 255, 255, .6) 3px, rgba(255, 255, 255, 0) 7px),
    linear-gradient(0deg, rgba(255, 255, 255, 0), #fff 50%, rgba(255, 255, 255, 0)) 50% 50% / 1.4px 100% no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 50%, rgba(255, 255, 255, 0)) 50% 50% / 100% 1.4px no-repeat;
  filter: drop-shadow(0 0 3px #fff);
  animation: twinkle 3.2s ease-in-out var(--d) infinite;
  transform: scale(0);
}
.twinkle.sm { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
@keyframes twinkle {
  0%, 60%, 100% { transform: scale(0) rotate(0deg); opacity: 0; }
  75% { transform: scale(1.25) rotate(45deg); opacity: 1; }
  88% { transform: scale(.4) rotate(80deg); opacity: .6; }
}

.plaque-content {
  font-variant-numeric: lining-nums;
  position: relative;
  z-index: 1;
  text-align: center;
  display: grid;
  justify-items: center;
}

/* testo cromato */
.chrome {
  background-image:
    linear-gradient(105deg, rgba(255, 236, 228, 0) 40%, rgba(255, 236, 228, .85) 49%, rgba(255, 236, 228, 0) 58%),
    linear-gradient(180deg, #e9b3a2 0%, #b0695a 20%, #d99b88 36%, #85412f 54%, #a65c4b 66%, #cf8d79 80%, #6e3226 100%);
  background-size: 260% 100%, 100% 100%;
  background-position: 160% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: .5px rgba(98, 42, 32, .35);
  filter:
    drop-shadow(0 1px 0 rgba(255, 244, 240, .9))
    drop-shadow(0 2px 2px rgba(90, 38, 28, .45))
    drop-shadow(0 10px 16px rgba(90, 38, 28, .22));
  animation: shimmer 6s ease-in-out 2.4s infinite;
}
@keyframes shimmer {
  0% { background-position: 160% 0, 0 0; }
  45%, 100% { background-position: -60% 0, 0 0; }
}
.chrome-soft {
  color: #8a4537;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 2px 3px rgba(130, 70, 58, .2);
}

.age {
  font-family: "Playfair Display", "Bodoni Moda", Georgia, serif;
  font-weight: 800;
  font-size: calc(var(--pw) * .34);
  line-height: 1;
  letter-spacing: -.02em;
  padding: .04em .18em .02em;
  margin-bottom: -.02em;
  -webkit-text-stroke: 0;
}
.age { position: relative; }
.tiara {
  position: absolute;
  left: var(--tx, 48%);
  top: var(--ty, -18%);
  width: var(--tw, 46%);
  height: auto;
  transform: translate(-50%, -100%) rotate(var(--trot, 46deg));
  transform-origin: 50% 100%;
  filter: saturate(1.12) contrast(1.08) brightness(1.04) drop-shadow(0 3px 3px rgba(90, 38, 28, .35));
  pointer-events: none;
}
.age .deg {
  font-size: .5em;
  vertical-align: top;
  position: relative;
  top: .2em;
  margin-left: .17em;
}
.name {
  --nlen: 11;
  font-family: var(--script);
  font-weight: 400;
  font-size: min(calc(var(--pw) * .26), calc(var(--pw) * 2.05 / var(--nlen)));
  line-height: 1.15;
  padding: 0 .3em .12em;
  transform: rotate(-4deg);
  white-space: nowrap;
  -webkit-text-stroke: .9px rgba(110, 48, 36, .55);
}
.kicker {
  margin-top: calc(var(--pw) * .025);
  font-size: max(13px, calc(var(--pw) * .046));
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-strong);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
  padding-left: .26em;
}
.date {
  width: 100%;
  margin-top: calc(var(--pw) * .045);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: max(13.5px, calc(var(--pw) * .05));
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-strong);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}
.date span {
  border-top: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
  padding: .5em 0 .45em .16em;
}
.date-num {
  font-size: max(30px, calc(var(--pw) * .12));
  font-weight: 600;
  line-height: 1;
  padding: 0 .32em;
  letter-spacing: 0;
}
.time {
  margin-top: calc(var(--pw) * .03);
  font-size: max(13px, calc(var(--pw) * .048));
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-strong);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
  padding-left: .22em;
}
.venue {
  margin-top: calc(var(--pw) * .012);
  font-style: italic;
  font-weight: 600;
  font-size: max(17px, calc(var(--pw) * .066));
  color: var(--ink-strong);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

/* pulsanti tondi con etichetta leggibile */
.actions {
  margin-top: calc(var(--pw) * .045);
  display: flex;
  justify-content: center;
  gap: calc(var(--pw) * .05);
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 64px;
  padding: 2px;
  border-radius: 14px;
  color: var(--ink-strong);
  text-decoration: none;
  transition: transform .25s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.action:active { transform: scale(.94); }
.action:focus-visible { outline: 2px solid #b5776a; outline-offset: 3px; }
.action svg { width: max(52px, calc(var(--pw) * .19)); height: auto; aspect-ratio: 1; display: block; overflow: visible; }
.action-label {
  font-size: max(10.5px, calc(var(--pw) * .032));
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}
.ring-o {
  fill: rgba(255, 255, 255, .32);
  stroke: url(#chromeStroke);
  stroke-width: 2.4;
  filter: drop-shadow(0 2px 2px rgba(130, 70, 58, .3));
}
.ring-i { fill: rgba(255, 250, 248, .2); stroke: rgba(185, 125, 112, .55); stroke-width: .8; }
.ico {
  fill: none;
  stroke: #7a4136;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-fill { fill: #7a4136; }
@media (hover: hover) {
  .action:hover { transform: translateY(-2px); }
  .action:hover .ring-o { fill: rgba(255, 255, 255, .6); }
}

.deadline {
  margin-top: calc(var(--pw) * .045);
  font-size: max(11px, calc(var(--pw) * .033));
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-strong);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

/* apparizione progressiva */
.reveal { opacity: 0; translate: 0 14px; }
#invite.is-active .reveal {
  animation: reveal 1.2s var(--ease-out) both;
  animation-delay: calc(var(--i) * 140ms + 450ms);
}
#invite.is-active .chrome.reveal {
  animation: reveal 1.2s var(--ease-out) both, shimmer 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 140ms + 450ms), calc(var(--i) * 400ms + 2600ms);
}
@keyframes reveal {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}

/* ==========================================================
   MODALI
   ========================================================== */
.modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(246, 226, 220, .4);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .35s ease;
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal-card {
  position: relative;
  width: min(88vw, 370px);
  padding: 26px 22px 24px;
  border-radius: 24px;
  background: rgba(255, 249, 247, .9);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 24px 60px rgba(110, 55, 45, .2), inset 0 1px 0 #fff;
  text-align: center;
  transform: translateY(16px) scale(.96);
  transition: transform .45s var(--ease-out);
}
.modal.is-open .modal-card { transform: none; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  font-size: 26px;
  line-height: 1;
  color: #6a3c33;
  border-radius: 50%;
}
.modal-title {
  font-style: italic;
  font-weight: 400;
  font-size: 27px;
  color: #8a5d55;
  margin-bottom: 16px;
}
.dress-value {
  font-size: 40px;
  font-weight: 300;
  color: #6f453e;
  letter-spacing: .01em;
  line-height: 1.1;
}
.dress-note {
  margin-top: 10px;
  font-size: 15px;
  font-style: italic;
  color: #6a3c33;
}
.dress-note:empty { display: none; }

#rsvpForm { display: grid; gap: 12px; }
#rsvpForm .modal-title { margin-bottom: 4px; }
.field {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e8d0c8;
  background: rgba(255, 255, 255, .75);
  color: #5e3f39;
  font-size: 18px;
  outline: none;
  resize: none;
  transition: border-color .2s, box-shadow .2s;
}
.field::placeholder { color: #9a746b; }
.field:focus { border-color: #c69b8f; box-shadow: 0 0 0 3px rgba(198, 140, 125, .18); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill {
  padding: 12px 6px 11px;
  border-radius: 999px;
  border: 1px solid #dbb6ab;
  background: rgba(255, 255, 255, .6);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6a3c33;
  transition: background .25s, color .25s, border-color .25s;
}
.pill[aria-checked="true"] { background: #b5776a; border-color: #b5776a; color: #fff; }
.submit {
  margin-top: 4px;
  padding: 14px;
  border-radius: 999px;
  background: #e3c4ba;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  transition: background .3s, transform .2s;
}
.submit:not(:disabled), .submit.is-ready { background: #b5776a; }
.submit:disabled { cursor: default; }
.submit:not(:disabled):active { transform: scale(.98); }
.form-err { margin: -2px 0 0; min-height: 0; color: #a3261c; font-weight: 700; font-size: 15px; line-height: 1.35; }
.form-err:empty { display: none; }
.thanks-text { font-size: 19px; color: #7a5048; line-height: 1.4; margin-bottom: 18px; }
.thanks .submit { width: 100%; }

/* ---------- pulsante audio ---------- */
.audio-btn {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 9;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .45);
  border: 1px solid rgba(255, 255, 255, .9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(120, 60, 50, .15);
}
.audio-btn svg { width: 19px; height: 19px; fill: none; stroke: #8a5d55; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.audio-btn svg path:first-child { fill: #8a5d55; }
.audio-btn .mute { display: none; }
.audio-btn.is-muted .wave { display: none; }
.audio-btn.is-muted .mute { display: block; }

/* ---------- desktop: cornice ---------- */
@media (min-width: 700px) and (min-height: 600px) {
  .tap-btn { font-size: 13.5px; }
}

/* ---------- movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}
