@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --bg-top: #0f141d;
  --bg-mid: #121a27;
  --bg-bot: #0e1822;
  --ink: #ebf1fb;
  --ink-soft: #a5b3cc;
  --brand: #ff7b5c;
  --brand-strong: #f56343;
  --mint: #67d7bf;
  --mint-soft: #173a36;
  --card: rgba(20, 28, 40, 0.86);
  --card-strong: #1a2332;
  --border: rgba(113, 140, 175, 0.34);
  --success: #4cd29b;
  --error: #ff6b80;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 123, 92, 0.18), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(103, 215, 191, 0.2), transparent 38%),
    linear-gradient(155deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bot) 100%);
}

body::after {
  content: "S + Q";
  position: fixed;
  right: 14px;
  bottom: 10px;
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: rgba(173, 193, 224, 0.26);
  pointer-events: none;
}

.bg-blur {
  position: fixed;
  z-index: 0;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(68px);
  opacity: 0.42;
  pointer-events: none;
}

.bg-blur-a {
  top: -100px;
  right: -120px;
  background: #ff875f;
}

.bg-blur-b {
  bottom: -120px;
  left: -140px;
  background: #48bba1;
}

.cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 123, 92, 0.18), transparent 46%),
    linear-gradient(180deg, rgba(8, 12, 18, 0.95), rgba(8, 12, 18, 0.98));
  opacity: 0;
  visibility: hidden;
}

.cinematic-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at center, transparent 22%, rgba(0, 0, 0, 0.34) 100%);
  pointer-events: none;
}

.cinematic-overlay::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 30% 38%, rgba(255, 160, 136, 0.18), transparent 26%),
    radial-gradient(circle at 72% 64%, rgba(139, 240, 213, 0.14), transparent 28%);
}

.cinematic-overlay > * {
  position: relative;
  z-index: 3;
}

.cinematic-overlay.cinematic-flashback {
  background:
    radial-gradient(circle at 52% 34%, rgba(103, 215, 191, 0.2), transparent 46%),
    linear-gradient(180deg, rgba(7, 14, 20, 0.95), rgba(7, 14, 20, 0.98));
}

.cinematic-overlay.is-visible {
  visibility: visible;
  pointer-events: auto;
}

.cinematic-overlay h2 {
  font-size: clamp(2.1rem, 7vw, 4rem);
  letter-spacing: 0.02em;
  margin: 0;
  color: #f5f8ff;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(10px);
}

.cinematic-overlay p {
  margin: 8px 0 0;
  color: #d2dcec;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(10px);
}

.cinematic-kicker {
  margin: 0;
  color: #7de2c8;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
}

.cinematic-heart {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 8vw, 3.3rem);
  color: #ff987f;
  text-shadow: 0 0 20px rgba(255, 122, 92, 0.58), 0 0 40px rgba(255, 122, 92, 0.24);
  opacity: 0;
  transform: scale(0.6);
}

.cinematic-heart::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 152, 127, 0.5);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
}

.cinematic-overlay.cinematic-flashback .cinematic-kicker {
  color: #9cefd8;
}

.cinematic-play {
  animation: cinematic-fade var(--cinematic-duration, 2000ms) ease forwards;
}

.cinematic-manual {
  cursor: pointer;
}

.cinematic-play::after {
  animation: cinematic-drift var(--cinematic-duration, 2000ms) ease-in-out forwards;
}

.cinematic-play .cinematic-heart {
  animation: heart-beat-fade var(--cinematic-heart-duration, 2000ms) ease forwards;
}

.cinematic-play .cinematic-heart::after {
  animation: heart-ring var(--cinematic-heart-duration, 2000ms) ease-out forwards;
}

.cinematic-play .cinematic-kicker {
  animation: cinematic-copy-rise var(--cinematic-copy-duration, 1300ms) ease 0.22s forwards;
}

.cinematic-play #cinematic-title {
  animation: cinematic-copy-rise var(--cinematic-copy-duration, 1300ms) ease 0.35s forwards;
}

.cinematic-play #cinematic-text {
  animation: cinematic-copy-rise var(--cinematic-copy-duration, 1300ms) ease 0.5s forwards;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 92vw);
  margin: 26px auto 46px;
  display: grid;
  gap: 18px;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle at 50% 20%, rgba(255, 123, 92, 0.08), transparent 46%);
}

#game-screen {
  display: grid;
  gap: 18px;
}

.card {
  position: relative;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-strong) 100%);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 20px 44px rgba(5, 9, 16, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 172, 212, 0.45);
  box-shadow:
    0 24px 50px rgba(5, 9, 16, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero {
  padding: 24px;
  animation: fade-up 0.55s ease;
}

.slide-out-left {
  animation: slide-out-left 0.32s ease forwards;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(56px);
}

.slide-in-right-active {
  animation: slide-in-right 0.36s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mint);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  font-family: "Cormorant Garamond", serif;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin-bottom: 12px;
  background: linear-gradient(95deg, #ffd6c5 0%, #ff9e7a 40%, #8ce7cf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.2rem);
}

h3 {
  font-size: clamp(1.32rem, 3.5vw, 1.55rem);
}

.hero-copy {
  margin: 0;
  color: var(--ink-soft);
  max-width: 58ch;
  line-height: 1.56;
  font-size: 1.02rem;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.escape-rules {
  margin: 14px 0 0;
  color: #c7a499;
  font-weight: 600;
  line-height: 1.5;
}

.timeline {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(13, 21, 33, 0.56);
  border: 1px dashed rgba(126, 160, 200, 0.34);
}

.timeline h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.timeline ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  display: grid;
  gap: 9px;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(110px, 148px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(16, 25, 38, 0.68);
  border: 1px solid rgba(118, 151, 192, 0.18);
}

.timeline-time {
  color: #ffd2c5;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.timeline-copy {
  line-height: 1.45;
}

.game-status {
  overflow: hidden;
  padding: 22px 22px 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 140, 108, 0.15), transparent 38%),
    radial-gradient(circle at 100% 18%, rgba(103, 215, 191, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(20, 28, 40, 0.94), rgba(17, 25, 36, 0.96));
  border-color: rgba(138, 170, 212, 0.4);
}

.game-status::before {
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: skewX(-18deg);
  animation: shimmer-scan 4.8s ease-in-out infinite;
}

.game-status h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.55rem, 4.1vw, 2rem);
  letter-spacing: 0.01em;
}

.game-status p {
  margin: 0;
  color: var(--ink-soft);
}

#game-status-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 160, 201, 0.34);
  background: rgba(16, 24, 35, 0.75);
  color: #a9d7cc;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

#game-status-copy {
  max-width: 54ch;
  line-height: 1.45;
}

.btn {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  padding: 11px 18px;
  transition: transform 0.18s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #ff9868 100%);
  box-shadow: 0 10px 22px rgba(255, 114, 84, 0.34);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-ghost {
  color: var(--ink);
  background: #1a2434;
  border: 1px solid var(--border);
}

.code-form {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.code-form input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(126, 157, 197, 0.35);
  padding: 0 14px;
  background: #111a27;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.code-form input:focus {
  border-color: rgba(255, 123, 92, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 123, 92, 0.18);
}

.feedback {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-weight: 600;
}

.feedback.success {
  color: var(--success);
}

.feedback.error {
  color: var(--error);
}

.offline {
  margin: 0;
  color: var(--error);
  font-weight: 700;
}

.progress-rail {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  margin-top: 14px;
  background: linear-gradient(90deg, #172234, #131c2a);
  border: 1px solid rgba(120, 152, 194, 0.26);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand) 0%, #f6b45c 58%, #75e0c7 100%);
  box-shadow: 0 0 16px rgba(255, 134, 98, 0.38);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#progress-text {
  display: inline-flex;
  align-items: center;
  margin: 10px 8px 0 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 167, 134, 0.34);
  background: rgba(45, 26, 24, 0.4);
  color: #ffd2c4;
  font-weight: 700;
  font-size: 0.84rem;
}

.progress-arc {
  display: inline-flex;
  align-items: center;
  margin: 10px 0 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 176, 223, 0.28);
  background: rgba(22, 34, 50, 0.75);
  color: #92b6e5;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.steps {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.step {
  border-radius: 13px;
  text-align: center;
  padding: 0;
  font-weight: 700;
  font-size: 0.8rem;
  background: linear-gradient(180deg, #111a28, #0f1723);
  border: 1px solid rgba(132, 163, 202, 0.23);
  color: #9db1cf;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.step-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  padding: 9px 6px;
  letter-spacing: 0.01em;
}

.step-btn:not(:disabled) {
  cursor: pointer;
}

.step-btn:not(:disabled):hover {
  filter: brightness(1.05);
}

.step-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.step.done {
  border-color: rgba(82, 190, 158, 0.68);
  background: linear-gradient(180deg, #16372f, #132f29);
  color: #abf0db;
  box-shadow: 0 8px 18px rgba(36, 100, 84, 0.26);
}

.step.active {
  border-color: rgba(255, 171, 142, 0.8);
  background: linear-gradient(180deg, #3d2627, #2f1f24);
  color: #ffd8cb;
  box-shadow: 0 10px 24px rgba(118, 58, 48, 0.32);
  transform: translateY(-2px);
}

.stop-card {
  position: relative;
  animation: fade-up 0.45s ease;
}

.stop-card.stop-unlocked {
  border-color: rgba(88, 149, 127, 0.38);
}

#active-stop.stop-enter {
  animation: stop-enter 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.stop-title {
  font-size: clamp(1.58rem, 4.8vw, 2.15rem);
  margin-bottom: 10px;
}

.chapter-subtitle {
  margin: 0 0 7px;
  color: #ffd3c7;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.stop-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 10px;
}

.stop-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(131, 169, 214, 0.34);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(18, 31, 48, 0.85);
  color: #b8c9e4;
  font-size: 0.78rem;
  line-height: 1;
}

.story {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.62;
  font-size: 1.03rem;
}

.stop-image {
  display: block;
  width: auto;
  max-width: min(100%, 560px);
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid rgba(124, 156, 196, 0.26);
  max-height: min(64vh, 560px);
  object-fit: contain;
  background: #0f1825;
  box-shadow: 0 10px 24px rgba(2, 6, 14, 0.5);
}

.stop-image-wrap {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stop-image-wrap-rotate {
  min-height: min(58vh, 520px);
}

.stop-image-rotate-90 {
  transform: rotate(90deg);
  transform-origin: center;
  max-height: min(46vh, 360px);
}

.question-box {
  margin-top: 16px;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(21, 30, 44, 0.92), rgba(19, 28, 40, 0.92));
  border: 1px solid rgba(124, 156, 196, 0.28);
}

.question-box h3 {
  margin-bottom: 10px;
}

.option-list {
  display: grid;
  gap: 9px;
  margin: 0 0 13px;
  padding: 0;
  list-style: none;
}

.polaroid {
  background: #f6f4ef;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 12px 12px 28px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.42);
}
.polaroid.tilt-a {
  transform: rotate(-1.5deg);
}
.polaroid.tilt-b {
  transform: rotate(1.2deg);
}
.polaroid.tilt-c {
  transform: rotate(-0.9deg);
}
.polaroid.tilt-d {
  transform: rotate(0.8deg);
}

.option-label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 13px;
  background: #121c2a;
  border-radius: 6px;
  cursor: pointer;
}

.option-label.option-correct {
  border-color: #5cb99d;
  background: #163229;
}

.result-card {
  margin-top: 13px;
  border-radius: 15px;
  padding: 13px;
  background: #132032;
  border: 1px solid #255246;
}

.result-card h3 {
  margin-bottom: 8px;
}

.envelope-reveal {
  margin-top: 14px;
  display: grid;
  place-items: center;
}

.envelope {
  position: relative;
  width: min(360px, 90%);
  height: 220px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2d405a, #1b2a40);
  border: 1px solid rgba(132, 164, 208, 0.32);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(4, 8, 16, 0.5);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52%;
  background: linear-gradient(180deg, #3a5477, #243850);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  animation: envelope-open 1.05s ease forwards;
  z-index: 2;
}

.envelope-card {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 82%;
  transform: translateX(-50%) translateY(28px);
  background: linear-gradient(180deg, #1d2d43, #19283c);
  border: 1px solid rgba(138, 171, 215, 0.36);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  animation: envelope-card-rise 1.05s ease forwards;
  animation-delay: 0.1s;
  z-index: 1;
}

.envelope-card h3 {
  margin: 4px 0;
  font-size: 1.2rem;
}

.envelope-card p {
  margin: 0;
  color: var(--ink-soft);
}

.finale {
  text-align: center;
  background:
    linear-gradient(160deg, rgba(23, 32, 46, 0.98), rgba(30, 20, 32, 0.95)),
    radial-gradient(circle at 80% 18%, rgba(255, 123, 92, 0.18), transparent 42%);
}

.reset-card {
  padding: 14px 16px;
}

.love-burst {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 15;
}

.love-particle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle, #ffd9c8 0%, #ff7b5c 70%);
  box-shadow: 0 0 12px rgba(255, 123, 92, 0.55);
  animation: love-pop 0.78s ease-out forwards;
  animation-delay: var(--delay);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-out-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-64px);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(56px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes stop-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes envelope-open {
  0% {
    transform: rotateX(0deg);
    opacity: 1;
  }
  100% {
    transform: rotateX(165deg);
    opacity: 0.9;
  }
}

@keyframes envelope-card-rise {
  0% {
    transform: translateX(-50%) translateY(28px);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes cinematic-fade {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes heart-beat-fade {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(8px);
  }
  20% {
    opacity: 0.95;
    transform: scale(1);
  }
  34% {
    transform: scale(1.14);
  }
  46% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.08);
  }
  80% {
    opacity: 0.9;
    transform: scale(1.02) translateY(-4px);
  }
  100% {
    opacity: 0;
    transform: scale(1.2) translateY(-14px);
  }
}

@keyframes cinematic-copy-rise {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  22% {
    opacity: 1;
    transform: translateY(0);
  }
  78% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes cinematic-drift {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  25% {
    opacity: 0.85;
    transform: scale(1.05);
  }
  70% {
    opacity: 0.55;
    transform: scale(1.12) translateY(-6px);
  }
  100% {
    opacity: 0;
    transform: scale(1.16) translateY(-12px);
  }
}

@keyframes heart-ring {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  24% {
    opacity: 0.8;
  }
  62% {
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(3.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4.1);
  }
}

@keyframes shimmer-scan {
  0% {
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  60% {
    opacity: 0.4;
  }
  100% {
    transform: translateX(430%) skewX(-18deg);
    opacity: 0;
  }
}

@keyframes love-pop {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(1.15);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  body::after {
    opacity: 0.55;
    font-size: 0.64rem;
  }

  .app-shell {
    width: min(95vw, 980px);
    margin-top: 14px;
    gap: 14px;
  }

  .card {
    border-radius: 22px;
    padding: 16px;
  }

  .hero {
    padding: 18px;
  }

  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .step {
    font-size: 0.76rem;
  }

  #progress-text,
  .progress-arc {
    margin-top: 8px;
    font-size: 0.76rem;
    padding: 5px 9px;
  }

  .code-form {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .stop-image {
    max-height: min(54vh, 460px);
  }

  .stop-image-wrap-rotate {
    min-height: min(50vh, 420px);
  }

  .polaroid.tilt-a,
  .polaroid.tilt-b,
  .polaroid.tilt-c,
  .polaroid.tilt-d {
    transform: rotate(0deg);
  }

  .stop-image-rotate-90 {
    max-height: min(40vh, 300px);
  }
}