:root {
  --tinta: #161018;
  --tinta-suave: #3a2a48;
  --papel: #fffdf8;
  --boton: #e2186c;
  --boton-hover: #c0125c;
  --fondo: #fdf9ed;
  --sello: #ffe14a;
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--tinta);
  overflow-x: hidden;
  background-color: var(--fondo);
  background-image: radial-gradient(rgba(8, 32, 64, 0.2) 1.15px, transparent 1.25px);
  background-size: 8px 8px;
}

.escenario {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding:
    max(22px, env(safe-area-inset-top))
    18px
    max(28px, env(safe-area-inset-bottom));
  text-align: center;
}

.nombre {
  margin: 0;
  font-family: Bangers, Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  letter-spacing: 0.04em;
  line-height: 1;
}

.nombre--logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 4px;
  max-width: min(78vw, 280px);
}

.nombre--logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(92px, 26vw, 128px);
  object-fit: contain;
  filter: drop-shadow(4px 5px 0 rgba(22, 16, 24, 0.18));
}

.escena {
  position: relative;
  width: min(94vw, 440px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
}

.bocadillo-hueco {
  display: grid;
  grid-template-rows: 0fr;
  width: min(92vw, 390px);
  position: relative;
  z-index: 4;
}

.bocadillo {
  overflow: hidden;
  min-height: 0;
}

.bocadillo-cuerpo {
  margin: 0 6px;
  padding: 12px 14px 13px;
  background: var(--papel);
  color: var(--tinta);
  border: 4px solid var(--tinta);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--tinta);
  opacity: 0;
  transform: translateY(18px) scale(0.86);
  transform-origin: 50% 100%;
}

.sello {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 8px;
  padding: 3px 10px 1px;
  background: var(--sello);
  border: 3px solid var(--tinta);
  color: var(--tinta);
  font-family: Bangers, Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(1.02rem, 4.4vw, 1.28rem);
  letter-spacing: 0.045em;
  line-height: 1.05;
  text-align: center;
  transform: rotate(-1.5deg);
}

.frase {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  font-style: italic;
  font-size: clamp(1rem, 3.8vw, 1.12rem);
  line-height: 1.32;
  text-wrap: balance;
}

.chisme {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(170px, 48vw, 230px);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  overflow: visible;
}

.chisme:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 6px;
  border-radius: 24px;
}

.chisme:disabled {
  cursor: default;
}

.labios,
.oreja,
.shhh {
  position: absolute;
  pointer-events: none;
}

.labios {
  z-index: 2;
  left: 8%;
  bottom: 8%;
  width: min(52%, calc(100% - 40px));
  transform-origin: 50% 80%;
  animation: flotar 3.4s ease-in-out infinite;
  filter: drop-shadow(3px 4px 0 rgba(22, 16, 24, 0.16));
}

.labios img {
  display: block;
  width: 100%;
  height: auto;
}

.shhh {
  z-index: 6;
  left: 52%;
  top: 0;
  margin: 0;
  font-family: Bangers, Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 8vw, 2.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  color: var(--tinta);
  text-shadow: 3px 3px 0 var(--sello);
  opacity: 0;
  transform: translate(-30%, 12px) rotate(-12deg) scale(0.4);
}

.oreja {
  z-index: 3;
  right: 2%;
  bottom: 0;
  height: 92%;
  width: auto;
  transform: translateX(38%) rotate(8deg);
  transform-origin: 72% 82%;
  transition: transform 0.72s cubic-bezier(0.22, 0.8, 0.2, 1);
  filter: drop-shadow(4px 6px 0 rgba(22, 16, 24, 0.16));
}

.oreja img {
  display: block;
  width: auto;
  height: 100%;
}

.ayuda {
  margin: 2px 0 0;
  min-height: 1.5em;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--tinta);
  transition: opacity 0.25s ease;
}

.resena-hueco {
  display: grid;
  grid-template-rows: 0fr;
  width: min(92vw, 380px);
}

.resena {
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}

.resena h2 {
  margin: 10px 0 6px;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 560;
  line-height: 1.25;
}

.resena p {
  margin: 0;
  color: var(--tinta-suave);
  font-size: 0.98rem;
  line-height: 1.4;
}

.resena-gracias {
  margin-top: 10px;
  color: var(--tinta);
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 560;
  line-height: 1.25;
}

a.boton-google,
a.boton-google:link,
a.boton-google:visited {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  margin-top: 18px;
  padding: 10px 14px;
  border: 3px solid var(--tinta);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  color: #202124;
  font-family: Roboto, Arial, Helvetica, sans-serif;
  text-align: left;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--tinta);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

a.boton-google .boton-google__marca {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e8eaed;
}

a.boton-google .boton-google__marca svg {
  display: block;
  width: 22px;
  height: 22px;
}

a.boton-google .boton-google__cuerpo {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

a.boton-google .boton-google__estrellas {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

a.boton-google .boton-google__estrellas svg {
  width: 13px;
  height: 13px;
  fill: #fbbc04;
}

a.boton-google .boton-google__texto {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: #202124;
  text-decoration: none;
  white-space: nowrap;
}

a.boton-google:hover,
a.boton-google:focus-visible {
  background: #fff;
  color: #202124;
  text-decoration: none;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--tinta);
}

a.boton-google:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 3px;
}

a.boton-google:active {
  transform: translate(2px, 2px);
  background: #f8f9fa;
  color: #202124;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--tinta);
}

.compartir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--tinta);
  font: 600 0.98rem Outfit, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.compartir svg {
  display: block;
  width: 18px;
  height: 18px;
}

.compartir:hover,
.compartir:focus-visible {
  color: var(--boton);
  transform: translateY(-1px);
}

.compartir:focus-visible {
  outline: 2px solid var(--tinta);
  outline-offset: 3px;
  border-radius: 8px;
}

.compartir:active {
  transform: translateY(0);
}

.compartir:disabled {
  cursor: default;
  opacity: 0.6;
}

.escuchado .oreja {
  transform: translateX(-10%) rotate(-7deg);
}

.escuchado .shhh {
  animation: susurro 3.4s ease forwards;
}

.escuchado .labios {
  animation: none;
}

.escuchado .bocadillo-hueco {
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.5s ease 0.28s;
}

.escuchado .bocadillo-cuerpo {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.4s ease 0.42s,
    transform 0.5s cubic-bezier(0.22, 0.8, 0.2, 1) 0.38s;
}

.escuchado .ayuda {
  opacity: 0;
}

.escuchado .resena-hueco {
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.55s ease 0.55s;
}

.escuchado .resena {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 0.45s ease 0.75s,
    visibility 0s linear 0.75s;
}

@keyframes susurro {
  0% {
    opacity: 0;
    transform: translate(-30%, 16px) rotate(-16deg) scale(0.35);
  }
  14% {
    opacity: 1;
    transform: translate(-30%, -8px) rotate(-8deg) scale(1.08);
  }
  22% {
    opacity: 1;
    transform: translate(-30%, 0) rotate(-10deg) scale(1);
  }
  68% {
    opacity: 1;
    transform: translate(-30%, 0) rotate(-10deg) scale(1);
  }
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translate(-30%, -18px) rotate(-10deg) scale(0.94);
  }
}

@keyframes flotar {
  0%,
  100% {
    transform: translateY(0) rotate(-1.5deg);
  }
  50% {
    transform: translateY(-7px) rotate(1.5deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .labios {
    animation: none;
  }

  .oreja,
  .shhh,
  .bocadillo-cuerpo,
  .bocadillo-hueco,
  .ayuda,
  .resena,
  .resena-hueco {
    transition: none;
  }

  .escuchado .shhh {
    animation: none;
    opacity: 0;
  }
}

.escenario.captura {
  position: fixed;
  left: -10000px;
  top: 0;
  box-sizing: content-box;
  width: 100vw;
  min-height: 0;
  height: auto;
  justify-content: flex-start;
  overflow: visible;
  padding: 28px 20px 36px;
  background-color: var(--fondo);
  background-image: radial-gradient(rgba(8, 32, 64, 0.2) 1.15px, transparent 1.25px);
  background-size: 8px 8px;
  pointer-events: none;
}

.captura,
.captura * {
  transition: none !important;
  animation: none !important;
}

.captura .shhh {
  opacity: 0 !important;
  visibility: hidden !important;
}
