:root {
  --paper: #fff3fb;
  --surface: #ffffff;
  --ink: #33263d;
  --muted: #7d6c87;
  --line: #ead0ef;
  --lavender: #b58be6;
  --lavender-dark: #7651a6;
  --pink: #f49bc7;
  --pink-dark: #c95791;
  --shadow: 0 26px 70px rgba(135, 84, 151, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Mali", "Comic Sans MS", "Chalkboard SE", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  background:
    repeating-linear-gradient(45deg, rgba(181, 139, 230, 0.14) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(135deg, rgba(244, 155, 199, 0.14) 0 1px, transparent 1px 42px),
    linear-gradient(135deg, #fff3fb 0%, #f6edff 48%, #fff7fd 100%);
}

button {
  font: inherit;
  cursor: pointer;
}

.card-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-areas: "header" "content";
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* ===================== App Header ===================== */

.app-header {
  grid-area: header;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 243, 251, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(244, 155, 199, 0.22);
}

.app-header .music-button {
  display: none;
}

.is-unlocked .app-header .music-button {
  display: inline-grid;
}

.app-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lavender-dark);
  font-family: "Itim", "Mali", "Comic Sans MS", cursive;
  font-size: clamp(1.2rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(244, 155, 199, 0.18);
}

.title-kitty {
  height: 1.4em;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(201, 87, 145, 0.25));
}

.eyebrow {
  margin: 0;
  color: var(--pink-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lock-screen {
  grid-area: content;
  display: grid;
  place-items: center;
  padding: 32px 24px 24px;
  width: 100%;
}

.lock-screen.is-hidden {
  display: none;
}

.lock-card {
  position: relative;
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(181, 139, 230, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.lock-card h2 {
  margin: 0;
  color: var(--lavender-dark);
  font-family: "Itim", "Mali", "Comic Sans MS", cursive;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 5px 0 rgba(244, 155, 199, 0.18);
}

.lock-hint,
.lock-pattern,
.unlock-feedback {
  margin: 0;
  color: var(--muted);
}

.lock-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.lock-field {
  display: grid;
  gap: 8px;
  text-align: left;
}

.lock-field span {
  color: var(--pink-dark);
  font-weight: 700;
}

.lock-field input {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--lavender-dark);
  background: #fff;
  font-family: "Mali", "Comic Sans MS", "Chalkboard SE", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.lock-field input:focus {
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 4px rgba(201, 87, 145, 0.12);
}

.unlock-feedback {
  min-height: 24px;
  color: var(--pink-dark);
  font-weight: 700;
}

.unlock-button {
  width: 100%;
}

.card-scene {
  grid-area: content;
  justify-self: center;
  display: grid;
  gap: 22px;
  width: min(760px, 100%);
  padding: 24px;
  text-align: center;
}

/* fix: CSS display:grid overrides the [hidden] attribute */
.card-scene[hidden] { display: none; }

.scene-copy {
  display: grid;
  gap: 8px;
}

.scene-copy h1 {
  margin: 0;
  color: var(--lavender-dark);
  font-family: "Itim", "Mali", "Comic Sans MS", cursive;
  font-size: clamp(2.25rem, 8vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 5px 0 rgba(244, 155, 199, 0.18);
}

.scene-copy p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.24rem);
}

.lock-music-hint {
  display: grid;
  gap: 8px;
  text-align: center;
}

.lock-music-hint p {
  margin: 0;
  color: var(--pink-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.lock-music-hint .music-button {
  justify-self: center;
}

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

.music-button {
  justify-self: center;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid rgba(201, 87, 145, 0.24);
  border-radius: 999px;
  color: var(--pink-dark);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px rgba(150, 82, 156, 0.1);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.music-button span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  font-weight: 900;
}

.music-button strong {
  font-size: 0.95rem;
}

.music-button:hover {
  transform: translateY(-1px);
  background: #fff0f8;
}

.music-button.is-playing {
  color: var(--lavender-dark);
  background: #f8ecff;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 710px;
  perspective: 1200px;
}

.envelope {
  position: relative;
  display: grid;
  place-items: center;
  width: min(560px, 92vw);
  height: 400px;
  transform-style: preserve-3d;
  transition: transform 500ms ease, opacity 260ms ease;
}

.envelope-cta {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 24px;
  width: min(260px, 72%);
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  box-shadow: 0 14px 28px rgba(201, 87, 145, 0.22);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: translateX(-50%);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.envelope-cta:hover,
.envelope-cta:active {
  transform: translateX(-50%) scale(1.04);
  box-shadow: 0 18px 34px rgba(201, 87, 145, 0.3);
}

.card-scene.is-open .envelope-cta {
  opacity: 0;
  pointer-events: none;
}

.envelope-back,
.envelope-front,
.envelope-flap {
  position: absolute;
  display: block;
  width: 100%;
  height: 72%;
  bottom: 0;
  border: 2px solid rgba(118, 81, 166, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.envelope-back {
  background: #ffe5f3;
}

.envelope-front {
  z-index: 5;
  overflow: hidden;
  background:
    linear-gradient(34deg, transparent 49.5%, rgba(255, 255, 255, 0.6) 50%, transparent 50.5%),
    linear-gradient(-34deg, transparent 49.5%, rgba(255, 255, 255, 0.6) 50%, transparent 50.5%),
    linear-gradient(135deg, #ffd8ec, #e9d9ff);
}

.envelope-flap {
  z-index: 6;
  bottom: 165px;
  height: 170px;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  border-radius: 8px 8px 0 0;
  background: linear-gradient(135deg, #f7b6d8, #cdb2f4);
  transform-origin: 50% 100%;
  transition: transform 760ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.letter-peek {
  position: absolute;
  z-index: 3;
  top: 95px;
  display: grid;
  place-items: center;
  gap: 8px;
  width: 72%;
  height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--lavender-dark);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 253, 0.96)),
    var(--surface);
  font-weight: 850;
  box-shadow: 0 14px 30px rgba(135, 84, 151, 0.14);
  transition: transform 780ms cubic-bezier(0.2, 0.75, 0.2, 1), opacity 400ms ease;
}

.seal {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #fff;
  background: var(--pink-dark);
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(201, 87, 145, 0.24);
  transition: transform 520ms ease, opacity 360ms ease;
}

.peek-photo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid rgba(201, 87, 145, 0.22);
  border-radius: 999px;
}


.love-card {
  position: absolute;
  inset: auto auto 16px;
  display: grid;
  gap: 14px;
  width: min(590px, 92vw);
  min-height: 560px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(255, 240, 248, 0.9), rgba(255, 255, 255, 0.98) 48%),
    #fffafd;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(52px) rotateX(12deg) scale(0.94);
  transition: opacity 360ms ease, transform 560ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.love-card::before {
  content: "♥";
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(201, 87, 145, 0.15);
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.card-ribbon {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.card-ribbon span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(181, 139, 230, 0.28);
  border-radius: 999px;
  color: var(--pink-dark);
  background: #fff3fb;
  font-weight: 900;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.photo-strip img {
  width: 100%;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 18px rgba(135, 84, 151, 0.12);
}

.card-pages {
  position: relative;
  display: grid;
  min-height: 320px;
}

.card-page {
  grid-area: 1 / 1;
  display: grid;
  align-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.card-page.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.card-page h2 {
  margin: 0;
  color: var(--lavender-dark);
  font-family: "Itim", "Mali", "Comic Sans MS", cursive;
  font-size: clamp(1.4rem, 4.5vw, 2.0rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.card-page p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.95rem, 2.5vw, 1.08rem);
  line-height: 1.72;
}

.resume-hero-photo {
  justify-self: center;
  position: relative;
  width: 80px;
  height: 80px;
  margin-top: 0;
}

.resume-hero-photo img {
  width: 100%;
  height: 100%;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 14px 26px rgba(135, 84, 151, 0.16);
}

.resume-hero-photo span {
  position: absolute;
  left: 50%;
  bottom: -8px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--pink-dark);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}

.resume-card {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.resume-card div {
  display: grid;
  grid-template-columns: minmax(92px, 0.36fr) 1fr;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(181, 139, 230, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.resume-card span {
  color: var(--pink-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.resume-card strong {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.45;
}

/* Side-by-side layout for resume page */
.resume-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 14px;
}

.resume-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.resume-list li {
  position: relative;
  padding: 10px 12px 10px 38px;
  border: 1px solid rgba(201, 87, 145, 0.2);
  border-radius: 8px;
  background: rgba(255, 240, 248, 0.68);
  line-height: 1.55;
}

.resume-list li::before {
  content: "♡";
  position: absolute;
  left: 14px;
  top: 10px;
  color: var(--pink-dark);
  font-weight: 900;
}

.resume-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.resume-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(181, 139, 230, 0.28);
  border-radius: 999px;
  color: var(--lavender-dark);
  background: #f8ecff;
  font-weight: 700;
}

.answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

/* ===================== Answer Grid (Final Page) ===================== */

.answer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.final-page .answer-button {
  border-radius: 999px;
  padding: 0 18px;
  min-height: 38px;
  font-size: 0.92rem;
  background: linear-gradient(135deg, rgba(255, 240, 248, 0.92), rgba(248, 236, 255, 0.92));
  border-color: rgba(201, 87, 145, 0.28);
  color: var(--pink-dark);
  box-shadow: 0 4px 12px rgba(201, 87, 145, 0.10);
}

.final-page .answer-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 18px rgba(201, 87, 145, 0.2);
  background: linear-gradient(135deg, #ffe5f5, #f0e0ff);
}

.answer-grid {
  min-height: 96px;
}

.reveal-video-btn {
  display: none;
  width: min(260px, 80%);
  justify-self: center;
  justify-content: center;
}

.reveal-video-btn.is-visible {
  display: flex;
  align-items: center;
  animation: reveal-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes reveal-pop {
  from { opacity: 0; transform: scale(0.8) translateY(12px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

.love-video {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: #000;
}

.video-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd8ec, #e9d9ff);
  border: 2px solid rgba(118, 81, 166, 0.18);
  box-shadow: var(--shadow);
  color: var(--lavender-dark);
  font-weight: 700;
}

.video-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(201, 87, 145, 0.3);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.video-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 16px 34px rgba(201, 87, 145, 0.4);
}

.video-page {
  gap: 16px;
}

#goToFinal {
  width: 100%;
  justify-self: stretch;
}

.closing-page {
  gap: 20px;
}

.closing-cat {
  width: min(260px, 78%);
  border-radius: 20px;
  box-shadow: var(--shadow);
  justify-self: center;
  object-fit: cover;
}

.closing-text {
  margin: 0;
  color: var(--lavender-dark);
  font-family: "Itim", "Mali", cursive;
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  line-height: 1.7;
  font-weight: 700;
}

@keyframes button-pop-out {
  0%   { opacity: 1; transform: scale(1);    }
  35%  { opacity: 0.7; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(0.5);  }
}

.answer-button.is-popping {
  animation: button-pop-out 300ms ease forwards;
  pointer-events: none;
}

.primary-button,
.ghost-button,
.answer-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  box-shadow: 0 12px 24px rgba(201, 87, 145, 0.22);
}

.ghost-button,
.answer-button {
  color: var(--lavender-dark);
  background: #f8ecff;
  border-color: rgba(181, 139, 230, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.answer-button:hover {
  transform: translateY(-1px);
}

.ghost-button:disabled {
  cursor: default;
  opacity: 0.42;
  transform: none;
}

.card-nav {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.card-nav span {
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}

.reply-note {
  min-height: 48px;
  opacity: 0;
  transform: translateY(8px);
  color: var(--pink-dark);
  font-size: 1.05rem;
  font-weight: 850;
  text-align: center;
  transition: opacity 200ms ease, transform 200ms ease;
}

.reply-note.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card-scene.is-open .envelope {
  transform: translateY(-86px) scale(0.72);
  opacity: 0;
  pointer-events: none;
}

.card-scene.is-open .envelope-flap {
  transform: rotateX(178deg);
}

.card-scene.is-open .letter-peek {
  transform: translateY(-160px);
  opacity: 0;
  visibility: hidden;
}

.card-scene.is-open .seal {
  opacity: 0;
  transform: scale(0.4) rotate(22deg);
}

.card-scene.is-open .love-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) rotateX(0) scale(1);
}

/* ===== Mobile — optimised for iPhone 13 Pro Max (428 × 926) ===== */
@media (max-width: 680px) {
  body {
    overflow-x: hidden;
  }

  /* ---------- Header ---------- */
  .app-header {
    padding: 10px 16px;
    gap: 10px;
  }

  .app-title {
    font-size: 1.1rem;
    gap: 6px;
  }

  .title-kitty {
    height: 1.3em;
  }

  .music-button {
    padding: 0 12px;
    min-height: 38px;
    font-size: 0;        /* hide text, show icon only on narrow screens */
  }

  .music-button span {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  /* ---------- Lock screen ---------- */
  .lock-screen {
    padding: 24px 16px 20px;
  }

  .lock-card {
    padding: 20px 18px;
    gap: 14px;
  }

  .lock-card h2 {
    font-size: 1.9rem;
  }

  .lock-kitty img {
    width: 82px;
    height: 82px;
  }

  .lock-field input {
    min-height: 52px;
    font-size: 1.15rem;
  }

  .unlock-button {
    min-height: 52px;
    font-size: 1.05rem;
  }

  /* ---------- Card scene wrapper ---------- */
  .card-scene {
    gap: 18px;
    padding: 16px 12px 20px;
  }

  .resume-main {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  /* ---------- Envelope ---------- */
  .stage {
    min-height: min(720px, calc(100dvh - 62px));
  }

  .envelope {
    height: 320px;
    width: min(400px, 94vw);
  }

  .envelope-flap {
    bottom: 132px;
    height: 138px;
  }

  .letter-peek {
    top: 74px;
    height: 138px;
    gap: 6px;
  }

  .peek-photo {
    width: 52px;
    height: 52px;
  }

  .card-scene.is-open .letter-peek {
    transform: translateY(-130px);
  }

  .envelope-cta {
    min-height: 44px;
    font-size: 0.95rem;
    bottom: 18px;
  }

  /* ---------- Love card ---------- */
  .love-card {
    width: min(400px, 94vw);
    min-height: 0;
    padding: 18px 16px 16px;
    gap: 12px;
  }

  /* ---------- Photo strip — 3 cols, taller ---------- */
  .photo-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .photo-strip img {
    height: 64px;
    border-radius: 8px;
  }

  /* ---------- Card pages ---------- */
  .card-pages {
    min-height: 330px;
  }

  .card-page {
    gap: 11px;
  }

  .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .card-page h2 {
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .card-page p {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  /* ---------- Resume page ---------- */
  .resume-hero-photo {
    width: 90px;
    height: 90px;
  }

  .resume-hero-photo span {
    font-size: 0.68rem;
    min-height: 24px;
    padding: 0 9px;
    bottom: -7px;
  }

  .resume-card {
    gap: 8px;
  }

  .resume-card div {
    grid-template-columns: 84px 1fr;
    min-height: 42px;
    padding: 8px 12px;
    gap: 8px;
  }

  .resume-card span {
    font-size: 0.86rem;
  }

  .resume-card strong {
    font-size: 0.95rem;
  }

  /* ---------- Skills list ---------- */
  .resume-list {
    gap: 8px;
  }

  .resume-list li {
    font-size: 0.93rem;
    line-height: 1.65;
    padding: 9px 12px 9px 34px;
  }

  /* ---------- Experience tags ---------- */
  .resume-tags {
    gap: 7px;
  }

  .resume-tags span {
    font-size: 0.88rem;
    min-height: 34px;
    padding: 0 12px;
  }

  /* ---------- Final page ---------- */
  .final-kitty {
    width: 88px;
    height: 88px;
  }

  .answer-grid {
    gap: 8px;
    margin-top: 6px;
  }

  .final-page .answer-button {
    min-height: 42px;
    font-size: 0.92rem;
    padding: 0 16px;
  }

  /* ---------- Navigation ---------- */
  .card-nav {
    gap: 10px;
  }

  .card-nav span {
    font-size: 0.9rem;
  }

  .primary-button,
  .ghost-button {
    min-height: 48px;
    font-size: 1rem;
  }

  /* ---------- Reply note ---------- */
  .reply-note {
    font-size: 1rem;
    min-height: 46px;
  }
}

/* ===================== Flash Transition ===================== */

.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle farthest-corner at 50% 50%,
      #ffffff                   0%,
      rgba(255, 240, 250, 0.98) 22%,
      rgba(244, 155, 199, 0.88) 52%,
      rgba(181, 139, 230, 0.45) 80%,
      transparent               100%
    );
}

.flash-overlay.is-flashing {
  animation: flash-vap 1.6s cubic-bezier(0.12, 0, 0.3, 1) forwards;
}

@keyframes flash-vap {
  0%   { opacity: 0;    }
  12%  { opacity: 1;    }
  38%  { opacity: 0.85; }
  100% { opacity: 0;    }
}

/* Card scene entrance (after flash) */
.card-scene.is-appearing {
  animation: scene-fade-in 0.45s 0.1s ease-out both;
}

@keyframes scene-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.card-scene.is-appearing .envelope {
  animation: envelope-rise 0.75s 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes envelope-rise {
  from { opacity: 0; transform: translateY(160px); }
  to   { opacity: 1; transform: translateY(0);     }
}

/* ===================== Kitty Decorations ===================== */

/* Bouncing Hello Kitty on lock screen */
.lock-kitty {
  display: flex;
  justify-content: center;
  margin: -4px 0;
}

.lock-kitty img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(201, 87, 145, 0.32));
  animation: kitty-bounce 2.6s ease-in-out infinite;
}

@keyframes kitty-bounce {
  0%, 100% { transform: translateY(0)    rotate(-4deg) scale(1);    }
  50%       { transform: translateY(-9px) rotate(4deg)  scale(1.05); }
}

/* Kitty row under eyebrow on lock screen */
.kitty-row {
  text-align: center;
  font-size: 1.3rem;
  letter-spacing: 0.28em;
  opacity: 0.6;
  margin: -2px 0;
}

/* Hello Kitty sticker strip inside love-card */
.card-kitty-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.card-kitty-strip img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(201, 87, 145, 0.22));
  transition: transform 220ms ease;
}

.card-kitty-strip img:hover {
  transform: scale(1.18) rotate(-6deg);
}

/* Hello Kitty sticker in final page */
.final-kitty {
  justify-self: center;
  width: 100px;
  height: 100px;
  margin: 0;
}

.final-kitty img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(201, 87, 145, 0.28));
  animation: kitty-bounce 2.6s ease-in-out infinite;
}

/* Kitty bow on top of lock card */
.lock-card::before {
  content: "🎀";
  position: absolute;
  top: -1.1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  filter: drop-shadow(0 3px 8px rgba(201, 87, 145, 0.35));
}

/* Small kitty watermark on love card bottom-left */
.love-card::after {
  content: "🐱";
  position: absolute;
  bottom: 14px;
  left: 18px;
  font-size: 2.2rem;
  opacity: 0.14;
  pointer-events: none;
}

/* Floating kitties in background */
.floating-kitties {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-kitties span {
  position: absolute;
  font-size: 1.7rem;
  animation: float-kitty 9s ease-in-out infinite;
}

.floating-kitties span:nth-child(1) { top: 8%;    left: 6%;    opacity: 0.10; animation-delay: 0s;   }
.floating-kitties span:nth-child(2) { top: 22%;   right: 5%;   opacity: 0.09; animation-delay: 1.8s; }
.floating-kitties span:nth-child(3) { top: 55%;   left: 3%;    opacity: 0.08; animation-delay: 3.2s; }
.floating-kitties span:nth-child(4) { bottom: 18%; right: 8%;  opacity: 0.10; animation-delay: 5s;   }
.floating-kitties span:nth-child(5) { top: 42%;   right: 2%;   opacity: 0.09; animation-delay: 2.4s; }
.floating-kitties span:nth-child(6) { bottom: 32%; left: 5%;   opacity: 0.08; animation-delay: 6.5s; }

@keyframes float-kitty {
  0%, 100% { transform: translateY(0)     rotate(-6deg) scale(1);    }
  50%       { transform: translateY(-14px) rotate(6deg)  scale(1.1); }
}

/* ===================== Flying Rose (closing page) ===================== */

.flying-rose {
  position: fixed;
  z-index: 300;
  pointer-events: none;
  line-height: 1;
  animation: rose-float 4.5s ease-out forwards;
}

@keyframes rose-float {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
  15%  { opacity: 1; transform: translate(calc(var(--tx) * 0.1), calc(var(--ty) * 0.1)) scale(1.1); }
  65%  { opacity: 1; transform: translate(calc(var(--tx) * 0.8), calc(var(--ty) * 0.8)) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.85); }
}

/* ===================== Flying Heart (next-page fireworks) ===================== */

.flying-heart {
  position: fixed;
  z-index: 300;
  pointer-events: none;
  line-height: 1;
  animation: heart-burst 3s ease-out forwards;
}

@keyframes heart-burst {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.3); }
  12%  { opacity: 1; transform: translate(calc(var(--tx) * 0.08), calc(var(--ty) * 0.08)) scale(1.2); }
  70%  { opacity: 1; transform: translate(calc(var(--tx) * 0.85), calc(var(--ty) * 0.85)) scale(0.95); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.8); }
}

/* ===================== Flying Cat (answer-button click) ===================== */

.flying-cat {
  position: fixed;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 64px rgba(135, 84, 151, 0.48),
    0 0 0 3px rgba(244, 155, 199, 0.38);
  pointer-events: none;
  z-index: 200;
  animation: cat-fly 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cat-fly {
  0%   { opacity: 0;   transform: scale(0.15) rotate(-12deg); }
  20%  { opacity: 1;   transform: scale(1.25) rotate(5deg);   }
  28%  { opacity: 1;   transform: scale(0.92) rotate(-2deg);  }
  36%  { opacity: 1;   transform: scale(1.06) rotate(1deg);   }
  46%  { opacity: 1;   transform: scale(1)    rotate(0deg);   }
  68%  { opacity: 1;   transform: scale(1)    rotate(0deg);   }
  100% { opacity: 0;   transform: scale(1.05) rotate(3deg);   }
}
