* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  background: #000;
  overflow: hidden;
  padding: 16px 10px;
}

body.end-active {
  background: #000;
}

.scene {
  --env-width: 460px;
  --env-half-w: 230px;
  --env-half-h: 150px;
  position: relative;
  width: min(100%, 520px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

body.end-active .scene {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

body.card-burning .scene {
  pointer-events: none;
}

.end-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

body.end-active .end-screen {
  opacity: 1;
  pointer-events: auto;
}

.narrative-block {
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;
  transform: translate(-50%, -64%);
  text-align: center;
  color: #d6c8a0;
  font-size: clamp(18px, 2.6vw, 30px);
  line-height: 1.35;
  letter-spacing: 0.01em;
  max-width: min(90vw, 760px);
  pointer-events: none;
}

.narrative-block.play {
  animation: quoteDropFade 3.8s ease-in-out forwards;
}

@keyframes quoteDropFade {
  0% {
    opacity: 0;
    transform: translate(-50%, -84%);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -28%);
  }
}

.light {
  position: absolute;
  top: 40%;
  left: 50%;
  width: min(640px, 140vw);
  height: min(640px, 140vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 240, 215, 0.26) 0%, rgba(255, 240, 215, 0.12) 36%, rgba(0, 0, 0, 0) 72%);
  opacity: 0;
  filter: blur(3px);
  pointer-events: none;
  transition: opacity 4.2s ease;
}

body.revealed .light {
  opacity: 1;
}

.wrapper {
  height: calc(var(--env-half-h) * 2);
  width: var(--env-width);
  max-width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 4s ease, transform 4s ease;
}

body.revealed .wrapper {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.wrapper.floating {
  animation: float 3.4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}

.lid {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  border-right: var(--env-half-w) solid transparent;
  border-bottom: var(--env-half-h) solid transparent;
  border-left: var(--env-half-w) solid transparent;
  transform-origin: top;
  transition: transform 0.35s linear, opacity 0.5s ease;
}

.lid.one {
  border-top: var(--env-half-h) solid #181818;
  transform: rotateX(0deg);
  z-index: 3;
  transition-delay: 0.45s;
}

.lid.two {
  border-top: var(--env-half-h) solid #0b0b0b;
  transform: rotateX(90deg);
  z-index: 1;
  transition-delay: 0.2s;
}

.envelope {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  border-top: var(--env-half-h) solid transparent;
  border-right: var(--env-half-w) solid #111;
  border-bottom: var(--env-half-h) solid #111;
  border-left: var(--env-half-w) solid #1d1d1d;
  z-index: 3;
  transition: opacity 0.5s ease;
}

.seal {
  position: absolute;
  width: 64px;
  height: 64px;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.seal-core,
.seal-half {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #cc8b72 0%, #b66344 55%, #8d3a27 100%);
  border: 2px solid #6f2718;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.45);
}

.seal-core {
  opacity: 1;
}

.seal-half {
  opacity: 1;
}

.seal-half.left {
  clip-path: polygon(0 0, 55% 0, 47% 24%, 57% 50%, 46% 76%, 53% 100%, 0 100%);
  transform-origin: 75% 50%;
  opacity: 0;
}

.seal-half.right {
  clip-path: polygon(45% 0, 100% 0, 100% 100%, 47% 100%, 54% 76%, 44% 50%, 53% 24%);
  transform-origin: 25% 50%;
  opacity: 0;
}

.letter {
  position: absolute;
  top: 0;
  width: 86%;
  min-height: 88%;
  background-color: #e6b39c;
  border-radius: 15px;
  z-index: 2;
  transition: transform 0.9s ease;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 18px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(96, 52, 37, 0.12);
}

.letter h1 {
  text-align: center;
  font-size: 19px;
  color: #000;
  line-height: 1.2;
}

.riddle {
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
  color: #000;
}

.letter > * {
  position: relative;
  z-index: 2;
}

.letter::before,
.letter::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.letter::before {
  z-index: 3;
  background-image:
    url("noise.jpg"),
    url("noise.jpg"),
    linear-gradient(
      180deg,
      #fff 0%,
      #fff3c9 12%,
      #ffc54d 28%,
      #ff7c1f 46%,
      #ae2300 72%,
      #220402 100%
    );
  background-size: 260% 320%, 220% 300%, 100% 100%;
  background-position: 1536px 9216px, 0 7168px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
  background-blend-mode: difference, difference, normal;
  filter: sepia(1) contrast(6) saturate(2.2) brightness(1.05);
  transform: translateY(100%);
  mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 22%,
    rgba(0, 0, 0, 0.92) 34%,
    rgba(0, 0, 0, 0.55) 48%,
    rgba(0, 0, 0, 0.16) 64%,
    rgba(0, 0, 0, 0) 78%
  );
}

.letter::after {
  z-index: 4;
  background:
    radial-gradient(circle at 14% 100%, rgba(255, 236, 173, 0.92) 0%, rgba(255, 236, 173, 0) 26%),
    radial-gradient(circle at 52% 100%, rgba(255, 208, 120, 0.9) 0%, rgba(255, 208, 120, 0) 32%),
    radial-gradient(circle at 82% 100%, rgba(255, 163, 88, 0.86) 0%, rgba(255, 163, 88, 0) 28%),
    linear-gradient(
      to top,
      rgba(10, 4, 2, 0.98) 0%,
      rgba(23, 9, 4, 0.96) 14%,
      rgba(49, 15, 4, 0.82) 28%,
      rgba(77, 27, 7, 0.48) 42%,
      rgba(45, 20, 12, 0.12) 60%,
      rgba(45, 20, 12, 0) 76%
    );
  mix-blend-mode: multiply;
  transform-origin: bottom center;
  transform: scaleY(0);
  filter: blur(1.2px) saturate(1.2);
}

.answer-form {
  display: flex;
  gap: 6px;
}

.answer-form input {
  flex: 1;
  border: 1px solid #000;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  color: #000;
  background: #f3d1c2;
}

.answer-form button {
  border: 1px solid #000;
  border-radius: 8px;
  padding: 8px 10px;
  background: #d99b80;
  color: #000;
  font-size: 12px;
  cursor: pointer;
}

.answer-form input:disabled,
.answer-form button:disabled {
  opacity: 0.72;
  cursor: default;
}

.hint,
.result {
  text-align: center;
  font-size: 11px;
  color: #000;
}

.hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 84px;
}

.hint-bottle {
  position: relative;
  width: 52px;
  height: 78px;
  border-radius: 12px 12px 16px 16px;
  border: 1px solid #7f4f3f;
  background: linear-gradient(180deg, #ffc7a5 0%, #e9885f 100%);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.55),
    inset -1px -3px 0 rgba(120, 60, 35, 0.28),
    0 2px 4px rgba(0, 0, 0, 0.3);
  transform-origin: 20% 80%;
  cursor: pointer;
}

.hint-bottle::before {
  content: "";
  position: absolute;
  inset: 8px 6px 10px;
  border-radius: 10px 10px 12px 12px;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(122, 65, 42, 0.18) 0 2px,
      rgba(255, 255, 255, 0.08) 2px 6px
    );
  pointer-events: none;
}

.hint.spill .hint-bottle {
  animation: bottleTilt 0.72s ease forwards;
}

.hint-bottle-cap {
  position: absolute;
  top: -14px;
  left: 1px;
  width: 50px;
  height: 14px;
  border-radius: 7px 7px 4px 4px;
  border: 1px solid #4e6270;
  background: linear-gradient(180deg, #cde8ff 0%, #8bb0c7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform-origin: 8% 88%;
}

.hint-bottle-cap::before {
  content: "";
  position: absolute;
  inset: 2px 3px;
  border-radius: 5px 5px 3px 3px;
  background:
    linear-gradient(
      to bottom,
      rgba(208, 230, 245, 0.45) 0,
      rgba(208, 230, 245, 0.45) 45%,
      rgba(67, 92, 110, 0.6) 45%,
      rgba(67, 92, 110, 0.6) 58%,
      rgba(208, 230, 245, 0.45) 58%,
      rgba(208, 230, 245, 0.45) 100%
    );
  pointer-events: none;
}

.hint.spill .hint-bottle-cap {
  animation: capOpen 0.44s cubic-bezier(0.2, 0.9, 0.2, 1) 0.08s forwards;
}

.hint-bottle-label {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 36px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid #b36a51;
  background: #ffe7da;
  color: #7a351f;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.hint-pills {
  display: none;
  position: relative;
  width: 178px;
  height: 44px;
}

.hint.spill .hint-pills {
  display: block;
}

.hint-pill {
  position: absolute;
  left: 4px;
  bottom: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #7b5a4e;
  background: linear-gradient(180deg, #ffe2d4 0%, #efb79f 55%, #de987f 100%);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #2b1c16;
  line-height: 1;
  text-transform: lowercase;
  min-width: 54px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -2px 0 rgba(118, 66, 49, 0.32),
    0 2px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  opacity: 0;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.hint.spill .hint-pill:nth-child(1) {
  animation: roll1 1.5s 0.2s forwards;
}

.hint.spill .hint-pill:nth-child(2) {
  animation: roll2 1.7s 0.24s forwards;
}

.hint.spill .hint-pill:nth-child(3) {
  animation: roll3 1.9s 0.28s forwards;
}

.hint-pill:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -2px 0 rgba(118, 66, 49, 0.34),
    0 4px 6px rgba(0, 0, 0, 0.28);
}

.hint-pill:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 2px rgba(118, 66, 49, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes roll1 {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(70px, 8px) rotate(360deg);
  }
}

@keyframes roll2 {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(116px, 14px) rotate(450deg);
  }
}

@keyframes roll3 {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(154px, 18px) rotate(520deg);
  }
}

@keyframes bottleTilt {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(86deg);
  }
}

@keyframes capOpen {
  0% {
    transform: rotate(0deg) translate(0, 0);
  }
  65% {
    transform: rotate(-120deg) translate(-8px, -10px);
  }
  100% {
    transform: rotate(-104deg) translate(-7px, -8px);
  }
}

.hidden {
  display: none !important;
}

.result {
  min-height: 16px;
  font-weight: 700;
}

.tap-open {
  border: none;
  background: transparent;
  color: #d6c8a0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity 0.4s ease;
}

body.ready .tap-open {
  opacity: 1;
  pointer-events: auto;
  animation: promptZoom 2.2s ease-in-out infinite;
}

@keyframes promptZoom {
  0% { transform: scale(0.94); }
  50% { transform: scale(1.05); }
  100% { transform: scale(0.94); }
}

.wrapper.open .lid.one {
  transform: rotateX(90deg);
  transition-delay: 0s;
}

.wrapper.open .lid.two {
  transform: rotateX(180deg);
  transition-delay: 0.2s;
}

.wrapper.open .letter {
  transform: translateY(-110%);
  transition-delay: 0.32s;
}

.wrapper.open.drop .letter {
  transform: translateY(-8%);
  transition-delay: 0s;
  transition-duration: 0.8s;
  z-index: 5;
  animation: settleZoom 1.6s ease-out 0.8s forwards;
}

.wrapper.open .seal {
  opacity: 1;
}

.wrapper.cracked .seal-core {
  animation: coreFade 0.16s linear forwards;
}

.wrapper.cracked .seal-half.left {
  animation: splitLeft 0.62s ease 0.14s forwards;
}

.wrapper.cracked .seal-half.right {
  animation: splitRight 0.62s ease 0.14s forwards;
}

.wrapper.envelope-gone .lid,
.wrapper.envelope-gone .envelope,
.wrapper.envelope-gone .seal {
  opacity: 0;
}

.wrapper.success-burning .letter {
  transform: translateY(-8%) scale(1.05);
  animation: letterBurnAway 5.4s cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
  clip-path: inset(0 0 0 0 round 15px);
  background-image: linear-gradient(
    to top,
    rgba(12, 5, 2, 0.88) 0%,
    rgba(30, 11, 5, 0.82) 10%,
    rgba(64, 24, 10, 0.66) 22%,
    rgba(122, 54, 21, 0.34) 36%,
    rgba(230, 179, 156, 0) 62%
  ),
  radial-gradient(
    120% 42% at 50% 100%,
    rgba(255, 132, 36, 0.34) 0%,
    rgba(185, 72, 18, 0.18) 26%,
    rgba(24, 8, 2, 0.12) 48%,
    rgba(24, 8, 2, 0) 72%
  );
  background-repeat: no-repeat;
  background-size: 100% 0%, 140% 0%;
  background-position: bottom center, center bottom;
  background-blend-mode: normal, screen;
  box-shadow:
    0 18px 28px rgba(0, 0, 0, 0.28),
    0 0 26px rgba(255, 146, 39, 0.48),
    0 0 58px rgba(255, 90, 0, 0.18);
}

.wrapper.success-burning .letter::before {
  opacity: 1;
  animation:
    fireNoise 5.4s linear infinite,
    fireRise 5.2s ease forwards;
}

.wrapper.success-burning .letter::after {
  opacity: 1;
  animation: charSpread 5.4s ease forwards;
}

.wrapper.success-burning .letter > * {
  animation: contentScorch 4s ease forwards;
}

@keyframes splitLeft {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(-14px, 22px) rotate(-20deg); }
}

@keyframes splitRight {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(14px, 22px) rotate(20deg); }
}

@keyframes coreFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes settleZoom {
  0% { transform: translateY(-8%) scale(1); }
  100% { transform: translateY(-8%) scale(1.05); }
}

@keyframes fireNoise {
  from {
    background-position: 1536px 9216px, 0 7168px, 0 0;
  }
  to {
    background-position: 512px 0, 1024px 0, 0 0;
  }
}

@keyframes fireRise {
  0% {
    opacity: 0;
    transform: translateY(100%);
  }
  8% {
    opacity: 0.82;
    transform: translateY(84%) scaleY(1.03);
  }
  14% {
    opacity: 1;
    transform: translateY(74%) scaleY(1.06);
  }
  42% {
    opacity: 1;
    transform: translateY(26%) scaleY(1.14);
  }
  70% {
    opacity: 0.78;
    transform: translateY(6%) scaleY(1.1);
  }
  86% {
    opacity: 0.18;
    transform: translateY(-4%) scaleY(1.04);
  }
  100% {
    opacity: 0;
    transform: translateY(-16%) scaleY(1.02);
  }
}

@keyframes charSpread {
  0% {
    opacity: 0.65;
    transform: scaleY(0.08);
  }
  12% {
    opacity: 0.94;
    transform: scaleY(0.26);
  }
  46% {
    opacity: 1;
    transform: scaleY(0.78);
  }
  72% {
    opacity: 1;
    transform: scaleY(0.88);
  }
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes contentScorch {
  0% {
    opacity: 1;
    filter: none;
  }
  32% {
    opacity: 0.95;
    filter: none;
  }
  100% {
    opacity: 0;
    filter: blur(2px);
  }
}

@keyframes letterBurnAway {
  0% {
    transform: translateY(-8%) scale(1.05);
    opacity: 1;
    filter: brightness(1);
    clip-path: inset(0 0 0 0 round 15px);
    background-size: 100% 0%, 140% 0%;
  }
  8% {
    transform: translateY(-8.2%) scale(1.055);
    opacity: 0.95;
    filter: brightness(1.02);
    clip-path: inset(0 0 0 0 round 15px);
    background-size: 100% 14%, 140% 12%;
  }
  24% {
    transform: translateY(-9%) scale(1.06);
    opacity: 0.88;
    filter: brightness(1);
    clip-path: inset(0 0 0 0 round 15px);
    background-size: 100% 34%, 140% 24%;
  }
  58% {
    transform: translateY(-11%) scale(1.03);
    opacity: 0.74;
    filter: brightness(0.78);
    clip-path: inset(0 0 0 0 round 15px);
    background-size: 100% 62%, 140% 40%;
  }
  62% {
    transform: translateY(-12%) scale(1);
    opacity: 0.22;
    filter: brightness(0.14);
    clip-path: inset(0 0 22% 0 round 15px);
    background-size: 100% 104%, 140% 6%;
  }
  80% {
    transform: translateY(-14%) scale(0.95);
    opacity: 0.08;
    filter: brightness(0.05);
    clip-path: inset(0 0 72% 0 round 15px);
    background-size: 100% 120%, 140% 0%;
  }
  100% {
    transform: translateY(-16%) scale(0.9);
    opacity: 0;
    filter: brightness(0);
    clip-path: inset(0 0 100% 0 round 15px);
    background-size: 100% 120%, 140% 0%;
  }
}

@keyframes settleZoomMobile {
  0% { transform: translateY(-14%) scale(1); }
  100% { transform: translateY(-14%) scale(1.02); }
}

@keyframes roll1Mobile {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(40px, 4px) rotate(280deg);
  }
}

@keyframes roll2Mobile {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(78px, 7px) rotate(320deg);
  }
}

@keyframes roll3Mobile {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(112px, 9px) rotate(360deg);
  }
}

body.opened .tap-open {
  opacity: 0;
  pointer-events: none;
  animation: none;
}

@media (max-width: 560px) {
  .scene {
    --env-width: 340px;
    --env-half-w: 170px;
    --env-half-h: 120px;
    width: min(100%, 360px);
    gap: 14px;
  }

  .seal {
    width: 56px;
    height: 56px;
  }

  .letter {
    top: 4%;
    min-height: 0;
    height: 90%;
    padding: 9px 9px 8px;
    gap: 4px;
    overflow: hidden;
  }

  .hint {
    min-height: 48px;
    gap: 4px;
  }

  .wrapper.open.drop .letter {
    transform: translateY(-10%);
    animation: settleZoomMobile 1.2s ease-out 0.8s forwards;
  }

  .wrapper.success-burning .letter {
    transform: translateY(-14%) scale(1.02);
    animation: letterBurnAwayMobile 5.4s cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
  }

  .letter h1 {
    font-size: 14px;
  }

  .riddle {
    font-size: 9px;
    line-height: 1.2;
  }

  .answer-form input,
  .answer-form button {
    padding: 6px 7px;
    font-size: 10px;
  }

  .hint-bottle {
    width: 38px;
    height: 58px;
  }

  .hint-bottle-cap {
    top: -10px;
    width: 36px;
    height: 10px;
  }

  .hint-bottle-label {
    top: 19px;
    font-size: 8px;
    padding: 2px 4px;
  }

  .hint-pills {
    width: 144px;
    height: 32px;
  }

  .hint-pill {
    min-width: 42px;
    font-size: 9px;
    padding: 2px 7px;
  }

  .hint.spill .hint-pill:nth-child(1) {
    animation: roll1Mobile 1.35s 0.16s forwards;
  }

  .hint.spill .hint-pill:nth-child(2) {
    animation: roll2Mobile 1.5s 0.2s forwards;
  }

  .hint.spill .hint-pill:nth-child(3) {
    animation: roll3Mobile 1.65s 0.24s forwards;
  }

  .result {
    min-height: 12px;
    font-size: 10px;
    line-height: 1.1;
  }

  .tap-open {
    font-size: 15px;
  }
}

@media (max-width: 400px) {
  .scene {
    --env-width: 300px;
    --env-half-w: 150px;
    --env-half-h: 105px;
    width: min(100%, 320px);
  }

  .letter {
    top: 4%;
    height: 90%;
  }

  .hint {
    min-height: 44px;
  }

  .answer-form {
    flex-direction: row;
  }

  .answer-form button {
    width: auto;
  }
}

@keyframes letterBurnAwayMobile {
  0% {
    transform: translateY(-14%) scale(1.02);
    opacity: 1;
    filter: brightness(1);
    clip-path: inset(0 0 0 0 round 15px);
    background-size: 100% 0%, 140% 0%;
  }
  8% {
    transform: translateY(-14.2%) scale(1.025);
    opacity: 0.95;
    filter: brightness(1.02);
    clip-path: inset(0 0 0 0 round 15px);
    background-size: 100% 14%, 140% 12%;
  }
  24% {
    transform: translateY(-15%) scale(1.03);
    opacity: 0.88;
    filter: brightness(1);
    clip-path: inset(0 0 0 0 round 15px);
    background-size: 100% 34%, 140% 24%;
  }
  58% {
    transform: translateY(-17%) scale(1);
    opacity: 0.74;
    filter: brightness(0.78);
    clip-path: inset(0 0 0 0 round 15px);
    background-size: 100% 62%, 140% 40%;
  }
  62% {
    transform: translateY(-18.4%) scale(0.96);
    opacity: 0.22;
    filter: brightness(0.14);
    clip-path: inset(0 0 22% 0 round 15px);
    background-size: 100% 104%, 140% 6%;
  }
  80% {
    transform: translateY(-19.6%) scale(0.92);
    opacity: 0.08;
    filter: brightness(0.05);
    clip-path: inset(0 0 72% 0 round 15px);
    background-size: 100% 120%, 140% 0%;
  }
  100% {
    transform: translateY(-21%) scale(0.88);
    opacity: 0;
    filter: brightness(0);
    clip-path: inset(0 0 100% 0 round 15px);
    background-size: 100% 120%, 140% 0%;
  }
}
