:root {
  --blush: #FFF7FA;
  --blush-2: #FFEAF2;
  --pink-soft: #FFC4D8;
  --pink: #FFAAC8;
  --rose: #F47FA7;
  --rose-deep: #D65C8A;
  --plum: #8D4967;
  --rose-text: #B85F82;
  --accent: #E8D7F4;

  --ink: var(--plum);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.75);
  --shadow-soft: 0 20px 60px -18px rgba(190, 80, 130, 0.14);
  --shadow-btn: 0 16px 34px -12px rgba(214, 92, 138, 0.55);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Itim", "Segoe UI", sans-serif;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--blush);
  color: var(--ink);
}

::selection {
  background: var(--pink-soft);
  color: var(--plum);
}

::-webkit-scrollbar {
  display: none;
}

button {
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* -------------------------------------------------------------------------
   Pages
------------------------------------------------------------------------- */

.page {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  scrollbar-width: none;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.page-home {
  background-image: url("assets/background_home.png");
  animation: pageBgFade 1.6s ease both;
}

.page-birthday {
  background-image: url("assets/background_birthday.png");
}

.page-wish {
  background-image: url("assets/background_wish.png");
}

@keyframes pageBgFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* -------------------------------------------------------------------------
   Page characters
------------------------------------------------------------------------- */

.page-character {
  position: absolute;
  z-index: 7;
  pointer-events: none;
  user-select: none;
}

.page-home.is-active .home-character {
  right: 4%;
  bottom: 0;
  width: clamp(200px, 24vw, 330px);
  animation: gifFloat 4.5s ease-in-out 1.3s infinite, fadeIn 1.4s ease 0.7s backwards;
}

.page-birthday.is-active .birthday-character {
  left: 3%;
  bottom: 0;
  width: clamp(150px, 19vw, 240px);
  animation: gifFloat 4.5s ease-in-out infinite, fadeIn 1s ease 0.35s backwards;
}

.wish-character {
  bottom: 0;
  width: clamp(140px, 20vw, 250px);
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 16%);
  mask-image: linear-gradient(to top, transparent 0%, #000 16%);
  transition: opacity 0.9s ease;
}

.wish-character-left {
  left: 3%;
}

.wish-character-right {
  right: 3%;
}

.page-wish.is-active .wish-character {
  animation: gifFloat 5s ease-in-out infinite;
}

.page-wish.is-celebrating .wish-character {
  opacity: 0.45;
}

@keyframes gifFloat {
  0%,
  100% {
    transform: translateY(-5px);
  }
  50% {
    transform: translateY(5px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* -------------------------------------------------------------------------
   Shared typography helpers
------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--rose-deep);
  opacity: 0.85;
}

.eyebrow i {
  font-size: 15px;
  opacity: 0.7;
}

/* -------------------------------------------------------------------------
   Home
------------------------------------------------------------------------- */

.home-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  max-width: 820px;
  padding: 0 22px;
  text-align: center;
}

.home-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 9.5vw, 116px);
  line-height: 1.03;
  letter-spacing: 0.01em;
  background: linear-gradient(120deg, var(--rose-deep) 0%, var(--plum) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 28px rgba(214, 92, 138, 0.35));
}

.home-subtitle {
  font-size: clamp(17px, 2.4vw, 22px);
  color: var(--plum);
  opacity: 0.85;
}

.home-gift {
  margin-top: 12px;
}

.page-home .eyebrow {
  animation: riseIn 0.9s ease 0.2s both;
}

.home-title {
  animation: riseIn 0.9s ease 0.45s both;
}

.home-subtitle {
  animation: riseIn 0.9s ease 0.8s both;
}

.home-gift {
  animation: riseIn 0.9s ease 1.1s both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------------------
   Buttons
------------------------------------------------------------------------- */

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 16px 38px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 19px;
  letter-spacing: 0.05em;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pink) 0%, var(--rose-deep) 100%);
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
}

.btn-primary i {
  font-size: 22px;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 42%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3.6s ease-in-out infinite;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px -12px rgba(214, 92, 138, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
}

@keyframes shimmer {
  0% {
    left: -60%;
  }
  55%,
  100% {
    left: 130%;
  }
}

.back-btn {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 6;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.back-btn:hover {
  opacity: 1;
  transform: translateX(-3px);
  background: rgba(255, 255, 255, 0.6);
}

.back-btn:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   Birthday page
------------------------------------------------------------------------- */

.birthday-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 40px 0;
}

.card {
  position: relative;
  width: min(640px, 90vw);
  padding: 46px 48px 40px;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.corner {
  position: absolute;
  font-size: 22px;
  color: var(--rose);
  opacity: 0.55;
  pointer-events: none;
}

.corner-tl {
  top: 16px;
  left: 18px;
}

.corner-tr {
  top: 16px;
  right: 18px;
}

.corner-bl {
  bottom: 16px;
  left: 18px;
}

.corner-br {
  bottom: 16px;
  right: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(26px, 4vw, 34px);
  color: var(--rose-deep);
}

.card-name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 46px);
  color: var(--plum);
}

.card-note {
  margin-top: 4px;
  font-size: 19px;
  color: var(--rose-deep);
  opacity: 0.9;
}

.letter {
  margin-top: 24px;
}

.letter-text {
  white-space: pre-line;
  font-size: 17px;
  line-height: 2;
  color: var(--plum);
}

.card-signoff {
  margin-top: 26px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--rose-deep);
  opacity: 0.75;
}

.page-birthday.is-active .card {
  animation: riseIn 0.9s ease 0.15s both;
}

.page-birthday.is-active .next-btn {
  animation: riseIn 0.9s ease 0.45s both;
}

.next-btn {
  min-width: 240px;
}

/* -------------------------------------------------------------------------
   Wish page
------------------------------------------------------------------------- */

.wish-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 8vh 20px 5vh;
  text-align: center;
}

.wish-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 72px);
  color: #fff;
  text-shadow: 0 8px 30px rgba(141, 73, 103, 0.55);
}

.wish-subtitle {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--blush-2);
  opacity: 0.9;
}

.wish-btn {
  min-width: 250px;
  margin-top: 10px;
  animation: wishPulse 2.8s ease-in-out infinite;
}

@keyframes wishPulse {
  0%,
  100% {
    box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow: 0 18px 46px -10px rgba(214, 92, 138, 0.78), 0 0 34px rgba(244, 127, 167, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
}

.wish-btn.is-pressed {
  transform: scale(0.93);
  box-shadow: 0 10px 26px -10px rgba(214, 92, 138, 0.6);
}

.wish-btn.is-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.page-wish.is-active .wish-title {
  animation: riseIn 0.9s ease 0.1s both;
}

.page-wish.is-active .wish-subtitle {
  animation: riseIn 0.9s ease 0.3s both;
}

.page-wish.is-active .cake-wrap {
  animation: riseIn 1s ease 0.45s both;
}

.page-wish.is-active .wish-btn {
  animation-delay: 0.7s;
}

/* -------------------------------------------------------------------------
   Cake
------------------------------------------------------------------------- */

.cake-wrap {
  position: relative;
  width: 250px;
  height: 290px;
  margin: 16px auto 6px;
}

.cake-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 340px;
  height: 340px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 159, 189, 0.5) 0%, rgba(255, 159, 189, 0) 68%);
  filter: blur(6px);
  opacity: 0.75;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.cake-wrap.is-glowing::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.25);
}

.cake {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 210px;
  height: 236px;
}

.cake-tier {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--pink) 0%, var(--rose) 100%);
  box-shadow: inset 0 -14px 22px rgba(214, 92, 138, 0.4);
  overflow: hidden;
}

.tier-bottom {
  bottom: 14px;
  width: 196px;
  height: 80px;
  border-radius: 16px;
}

.tier-top {
  bottom: 88px;
  width: 140px;
  height: 62px;
  border-radius: 14px;
}

.icing {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(180deg, #ffffff 0%, var(--blush) 55%, var(--pink-soft) 100%);
}

.icing::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 18px;
  background: radial-gradient(circle at 10px 0, var(--pink-soft) 9px, transparent 10px);
  background-size: 20px 100%;
}

.tier-bottom::after {
  content: "";
  position: absolute;
  inset: 26px 14px 12px;
  border-radius: 12px;
  background: radial-gradient(circle at 10px 10px, rgba(255, 255, 255, 0.6) 3px, transparent 3.6px);
  background-size: 20px 22px;
  opacity: 0.85;
}

.tier-top::after {
  content: "";
  position: absolute;
  inset: 24px 12px 12px;
  border-radius: 10px;
  background: radial-gradient(circle at 8px 8px, rgba(255, 255, 255, 0.55) 2.5px, transparent 3px);
  background-size: 16px 18px;
  opacity: 0.8;
}

.cake-plate {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 236px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, var(--blush-2) 100%);
  box-shadow: 0 8px 20px rgba(214, 92, 138, 0.3);
}

.candle-wrap {
  position: absolute;
  bottom: 144px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 46px;
}

.candle {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 14px;
  height: 44px;
  border-radius: 3px;
  background: repeating-linear-gradient(45deg, var(--rose-deep) 0 5px, var(--pink) 5px 10px);
  box-shadow: 0 4px 10px rgba(214, 92, 138, 0.35);
}

.candle::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 9px;
  border-radius: 2px;
  background: var(--plum);
}

.flame-halo {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 140, 0.55) 0%, rgba(255, 159, 189, 0.25) 45%, transparent 70%);
  filter: blur(4px);
  transition: opacity 0.9s ease;
}

.flame {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  width: 18px;
  height: 28px;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 50% 70%, #ffffff 0%, #ffe3b3 45%, #ffc47e 75%, #ffb45e 100%);
  filter: drop-shadow(0 0 12px rgba(255, 196, 126, 0.95)) drop-shadow(0 0 26px rgba(255, 159, 189, 0.6));
  transform-origin: 50% 100%;
  animation: flameFlicker 1.5s ease-in-out infinite;
}

@keyframes flameFlicker {
  0%,
  100% {
    transform: translateX(-50%) rotate(-4deg) scale(1);
  }
  25% {
    transform: translateX(-50%) rotate(3deg) scale(1.07, 0.93);
  }
  50% {
    transform: translateX(-50%) rotate(-2deg) scale(0.94, 1.06);
  }
  75% {
    transform: translateX(-50%) rotate(4deg) scale(1.05, 0.96);
  }
}

.flame.is-blow {
  animation: flameOut 0.7s ease forwards;
}

.flame.is-gone {
  display: none;
}

@keyframes flameOut {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(0.15);
    opacity: 0;
  }
}

.cake-wrap.is-wishing .flame-halo {
  opacity: 0;
}

.smoke-layer {
  position: absolute;
  left: 50%;
  bottom: 206px;
  z-index: 3;
  width: 0;
  height: 0;
}

.smoke {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(2px);
  animation: smokeRise var(--dur, 1.8s) ease-out var(--delay, 0s) forwards;
}

@keyframes smokeRise {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0.7;
  }
  100% {
    transform: translate(var(--dx, 10px), -80px) scale(1.7);
    opacity: 0;
  }
}

/* -------------------------------------------------------------------------
   Wish reveal
------------------------------------------------------------------------- */

.wish-reveal {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 22px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.wish-reveal::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background: radial-gradient(circle at 50% 45%, rgba(141, 73, 103, 0.32) 0%, rgba(141, 73, 103, 0.12) 46%, transparent 72%);
}

.wish-reveal.is-visible {
  opacity: 1;
  visibility: visible;
}

.reveal-thai {
  font-size: clamp(21px, 3.6vw, 30px);
  color: #fff;
  text-shadow: 0 4px 22px rgba(141, 73, 103, 0.7);
}

.reveal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6.5vw, 64px);
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 6px 30px rgba(214, 92, 138, 0.75);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease 0.15s, transform 1s ease 0.15s;
}

.reveal-sub {
  font-size: clamp(16px, 2.6vw, 21px);
  color: var(--blush-2);
  text-shadow: 0 3px 16px rgba(141, 73, 103, 0.6);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease 0.15s, transform 1s ease 0.15s;
}

.wish-gif {
  width: clamp(120px, 18vw, 190px);
  border-radius: 16px;
  opacity: 0;
  transform: scale(0.55) translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  filter: drop-shadow(0 14px 30px rgba(141, 73, 103, 0.45));
}

.wish-reveal.is-shown .wish-gif {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.wish-reveal.is-subtle .wish-gif {
  opacity: 0.4;
  transform: scale(0.8) translateY(10px);
}

.wish-reveal.is-full .reveal-title,
.wish-reveal.is-full .reveal-sub {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------------
   Overlay layers
------------------------------------------------------------------------- */

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  border-radius: 50%;
  background: radial-gradient(circle, var(--pink) 0%, var(--rose-deep) 100%);
  transform: scale(0);
  transition: transform 0.46s cubic-bezier(0.65, 0.05, 0.36, 1);
  pointer-events: none;
}

.transition-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(255, 247, 250, 0.9) 0%, rgba(255, 247, 250, 0) 46%);
}

.transition-overlay.is-open {
  transform: scale(5);
}

.stars-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: fixed;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  animation: starPulse ease-in-out infinite;
}

.stars-layer.is-bright .star {
  color: var(--blush-2);
}

@keyframes starPulse {
  0%,
  100% {
    opacity: 0.12;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.42;
    transform: scale(1.08);
  }
}

.particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hearts-layer {
  position: fixed;
  inset: 0;
  z-index: 42;
  pointer-events: none;
  overflow: hidden;
}

.float-heart {
  position: fixed;
  bottom: -44px;
  left: var(--x, 50vw);
  z-index: 42;
  color: var(--rose);
  font-size: var(--size, 16px);
  opacity: 0;
  animation: heartFloat var(--dur, 8s) linear forwards;
  pointer-events: none;
}

@keyframes heartFloat {
  0% {
    transform: translateY(0) rotate(-10deg) scale(0.8);
    opacity: 0;
  }
  12% {
    opacity: var(--o, 0.4);
  }
  80% {
    opacity: var(--o, 0.4);
  }
  100% {
    transform: translateY(-108vh) rotate(12deg) scale(1.05);
    opacity: 0;
  }
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: fixed;
  top: -24px;
  left: var(--x, 50%);
  width: var(--size, 8px);
  height: var(--size, 8px);
  background: var(--color, var(--pink));
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall var(--dur, 3.2s) linear var(--delay, 0s) forwards;
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0);
    opacity: 0;
  }
  8% {
    opacity: 0.95;
  }
  100% {
    transform: translate3d(var(--sway, 30px), 112vh, 0) rotate(var(--spin, 700deg));
    opacity: 0.85;
  }
}

/* -------------------------------------------------------------------------
   Responsive
------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .card {
    padding: 38px 32px 34px;
  }

  .page-character {
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .page-home {
    background-position: 60% 38%;
  }

  .page-birthday {
    background-position: 46% 30%;
  }

  .page-wish {
    background-position: 50% 40%;
  }

  .page-home.is-active {
    padding-bottom: 22vh;
  }

  .home-character {
    right: 2%;
    bottom: 0;
    width: 150px;
  }

  .birthday-character {
    left: 2%;
    bottom: 0;
    width: 110px;
  }

  .wish-character {
    width: 100px;
  }

  .wish-character-left {
    left: 2%;
  }

  .wish-character-right {
    right: 2%;
  }

  .home-content {
    gap: 20px;
  }

  .card {
    width: 92vw;
  }

  .letter-text {
    font-size: 16px;
    line-height: 1.95;
  }

  .wish-inner {
    padding: 9vh 16px 4vh;
    gap: 14px;
  }

  .cake-wrap {
    transform: scale(0.85);
    margin: 0 auto;
  }

  .btn-primary {
    min-height: 50px;
    font-size: 17px;
    padding: 14px 30px;
  }

  .music-btn {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  .music-btn i {
    font-size: 18px;
  }

  .decor i {
    font-size: 13px;
    opacity: 0.5;
  }

  .decor-bow {
    font-size: 20px;
  }

  .decor-bow.decor-tl {
    top: 10%;
    left: 19%;
  }

  .decor-bow.decor-tr {
    top: 9%;
    right: 22%;
  }

  .decor-bow.decor-bl {
    bottom: 5%;
    left: 5%;
  }

  .decor-bow.decor-br {
    bottom: 5%;
    right: 5%;
  }

  .decor-bow.decor-ml,
  .decor-bow.decor-mr,
  .decor-heart.decor-h1 {
    display: none;
  }

  .decor-spark.decor-ml {
    top: 24%;
    left: 6%;
  }

  .decor-star.decor-mr {
    top: 22%;
    right: 6%;
  }

  .decor-heart.decor-h2 {
    bottom: 8%;
    right: 9%;
  }

  .decor-home .decor-heart.decor-h2 {
    bottom: auto;
    top: 30%;
    right: 6%;
  }

  .decor-wish .decor-heart.decor-h2 {
    bottom: auto;
    top: 22%;
    right: 8%;
  }

  .secret-line {
    font-size: 16px;
  }

  .secret-pixel {
    width: 108px;
    height: 108px;
  }

  .lock-card {
    width: calc(100vw - 32px);
    padding: 34px 24px 24px;
  }

  .lock-icon {
    width: 54px;
    height: 54px;
    font-size: 26px;
  }

  .lock-input-wrap {
    gap: 12px;
  }

  .lock-digit {
    width: clamp(44px, 12vw, 54px);
    height: clamp(44px, 12vw, 54px);
    font-size: 21px;
  }

  .lock-btn {
    min-height: 50px;
    width: min(260px, 82%);
  }

  .lock-close {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 380px) {
  .lock-card {
    padding: 22px 18px 20px;
  }

  .lock-sub,
  .lock-sub-sub {
    font-size: 14px;
  }

  .lock-hint {
    font-size: 12px;
  }
}

/* -------------------------------------------------------------------------
   Music button
------------------------------------------------------------------------- */

.music-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(190, 80, 130, 0.15);
  color: var(--rose-deep);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.music-btn i {
  font-size: 20px;
}

.music-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(255, 255, 255, 0.72);
}

.music-btn:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
}

.music-btn.is-playing {
  box-shadow: 0 8px 25px rgba(190, 80, 130, 0.2), 0 0 0 0 rgba(214, 92, 138, 0.18);
  animation: musicGlow 3.2s ease-in-out infinite;
}

@keyframes musicGlow {
  0%,
  100% {
    box-shadow: 0 8px 25px rgba(190, 80, 130, 0.2), 0 0 0 0 rgba(214, 92, 138, 0.18);
  }
  50% {
    box-shadow: 0 8px 25px rgba(190, 80, 130, 0.2), 0 0 0 7px rgba(214, 92, 138, 0.08);
  }
}

.music-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.music-btn.is-playing .music-eq {
  display: inline-flex;
}

.music-eq span {
  width: 3px;
  border-radius: 2px;
  background: var(--rose-deep);
  transform-origin: bottom;
  animation: eqBounce 1.4s ease-in-out infinite;
}

.music-eq span:nth-child(1) {
  height: 10px;
  animation-duration: 1.1s;
}

.music-eq span:nth-child(2) {
  height: 7px;
  animation-duration: 1.6s;
}

.music-eq span:nth-child(3) {
  height: 8px;
  animation-duration: 1.3s;
}

@keyframes eqBounce {
  0%,
  100% {
    transform: scaleY(0.55);
  }
  50% {
    transform: scaleY(1);
  }
}

/* -------------------------------------------------------------------------
   Decorative ribbons & bows
------------------------------------------------------------------------- */

.decor {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.decor i {
  position: absolute;
  color: var(--decor-color, var(--rose));
  font-size: 18px;
  opacity: 0.55;
  filter: drop-shadow(0 3px 10px rgba(214, 92, 138, 0.25));
  animation: ribbonFloat 6s ease-in-out infinite;
}

.decor-bow {
  font-size: 30px;
}

.decor-spark {
  font-size: 15px;
}

.decor-star {
  font-size: 14px;
}

.decor-heart {
  font-size: 16px;
}

.decor-bow.decor-tl {
  top: 4%;
  left: 5%;
  animation-delay: 0s;
}

.decor-bow.decor-tr {
  top: 6%;
  right: 10%;
  animation-delay: 1.2s;
}

.decor-bow.decor-bl {
  bottom: 6%;
  left: 6%;
  animation-delay: 2s;
}

.decor-bow.decor-br {
  bottom: 8%;
  right: 6%;
  animation-delay: 0.8s;
}

.decor-bow.decor-ml {
  top: 44%;
  left: 3%;
  animation-delay: 1.6s;
}

.decor-bow.decor-mr {
  top: 42%;
  right: 3%;
  animation-delay: 0.4s;
}

.decor-spark.decor-ml {
  top: 30%;
  left: 4%;
  animation-duration: 7s;
  animation-delay: 0.6s;
}

.decor-star.decor-mr {
  top: 26%;
  right: 4%;
  animation-duration: 5.5s;
  animation-delay: 1.9s;
}

.decor-heart.decor-h1 {
  top: 13%;
  left: 8%;
  animation-duration: 6.5s;
  animation-delay: 1s;
}

.decor-heart.decor-h2 {
  bottom: 16%;
  right: 7%;
  animation-duration: 7s;
  animation-delay: 2.4s;
}

.decor-home {
  --decor-color: #f47fa7;
}

.decor-birthday {
  --decor-color: #deb0c2;
}

.decor-birthday i {
  opacity: 0.4;
}

.decor-wish {
  --decor-color: #c98fd6;
}

.decor-home .decor-heart.decor-h2 {
  top: 34%;
  right: 5%;
  bottom: auto;
}

.decor-wish .decor-heart.decor-h2 {
  top: 24%;
  right: 7%;
  bottom: auto;
}

@keyframes ribbonFloat {
  0%,
  100% {
    transform: translateY(-4px) rotate(2deg) scale(1);
  }
  50% {
    transform: translateY(4px) rotate(-2deg) scale(1.03);
  }
}

/* -------------------------------------------------------------------------
   Secret message
------------------------------------------------------------------------- */

.secret-hint {
  margin-top: 22px;
  text-align: center;
}

.secret-hint-text {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--rose-text);
  opacity: 0.55;
}

.secret-heart {
  margin-top: 6px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--rose);
  font-size: 20px;
  cursor: pointer;
  animation: heartPulse 2.6s ease-in-out infinite;
  transition: color 0.3s ease, filter 0.3s ease;
}

.secret-heart:hover {
  color: var(--rose-deep);
  filter: drop-shadow(0 0 10px rgba(244, 127, 167, 0.6));
}

.secret-heart:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
  border-radius: 50%;
}

.secret-heart.is-bursting {
  animation: none;
  transform: scale(1.35);
  color: var(--rose-deep);
  filter: drop-shadow(0 0 16px rgba(244, 127, 167, 0.95));
}

@keyframes heartPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

.sparkle-pop {
  position: fixed;
  z-index: 82;
  color: var(--rose);
  font-size: 14px;
  pointer-events: none;
  animation: sparklePop 0.7s ease-out forwards;
}

@keyframes sparklePop {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx, 0px), var(--dy, -40px)) scale(1);
    opacity: 0;
  }
}

.secret-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(141, 73, 103, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  opacity: 0;
  transition: opacity 0.6s ease, background-color 0.6s ease;
}

.secret-modal[hidden] {
  display: none;
}

.secret-modal.is-open {
  opacity: 1;
  background: rgba(141, 73, 103, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.secret-card {
  position: relative;
  width: min(460px, calc(100% - 32px));
  padding: 40px 34px 32px;
  background: linear-gradient(180deg, #fffdfd 0%, #fff7fa 100%);
  border: 1px solid var(--pink-soft);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(190, 80, 130, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.7s ease 0.12s, transform 0.7s ease 0.12s;
}

.secret-modal.is-open .secret-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.secret-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--rose-deep);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.secret-close:hover {
  transform: rotate(90deg);
  background: #ffffff;
}

.secret-close:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

.secret-deco {
  position: absolute;
  color: var(--rose);
  opacity: 0.5;
  font-size: 18px;
  pointer-events: none;
}

.secret-deco-tl {
  top: 16px;
  left: 16px;
}

.secret-deco-tr {
  top: 16px;
  right: 52px;
}

.secret-deco-bl {
  bottom: 14px;
  left: 16px;
}

.secret-deco-br {
  bottom: 14px;
  right: 16px;
}

.secret-line {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.9;
  color: var(--plum);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.secret-modal.is-open .secret-line {
  opacity: 1;
  transform: translateY(0);
}

.secret-line:nth-of-type(1) {
  transition-delay: 0.35s;
}

.secret-line:nth-of-type(2) {
  transition-delay: 0.95s;
}

.secret-line:nth-of-type(3) {
  transition-delay: 1.55s;
}

.secret-line:nth-of-type(4) {
  margin-top: 18px;
  transition-delay: 2.15s;
}

.secret-line:nth-of-type(5) {
  transition-delay: 2.75s;
}

.secret-pixel-wrap {
  position: relative;
  margin-top: 24px;
  text-align: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.9s ease 3.4s, transform 0.9s ease 3.4s;
}

.secret-modal.is-open .secret-pixel-wrap {
  opacity: 1;
  transform: scale(1);
}

.secret-pixel {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid var(--blush-2);
  box-shadow: 0 0 0 1px var(--pink-soft), 0 10px 26px rgba(190, 80, 130, 0.25);
  image-rendering: pixelated;
}

.secret-pixel-heart {
  margin-top: 10px;
  font-size: 18px;
  color: var(--rose);
  opacity: 0;
  transition: opacity 0.8s ease 3.8s;
}

.secret-modal.is-open .secret-pixel-heart {
  opacity: 1;
}

.pixel-heart {
  position: absolute;
  color: var(--rose);
  font-size: 12px;
  opacity: 0;
  animation: pixelHeartFloat 2.8s ease-in-out forwards;
  pointer-events: none;
}

@keyframes pixelHeartFloat {
  0% {
    transform: translateY(8px) scale(0.6);
    opacity: 0;
  }
  30% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-18px) scale(1.1);
    opacity: 0;
  }
}

/* -------------------------------------------------------------------------
   Birthday Lock
------------------------------------------------------------------------- */

.lock-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(214, 92, 138, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  opacity: 0;
  transition: opacity 0.55s ease, background-color 0.55s ease;
}

.lock-modal[hidden] {
  display: none;
}

.lock-modal.is-open {
  opacity: 1;
  background: rgba(214, 92, 138, 0.28);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.lock-card {
  position: relative;
  width: min(400px, calc(100% - 32px));
  padding: 40px 34px 30px;
  text-align: center;
  background: linear-gradient(180deg, #fffdfd 0%, #fff5f9 100%);
  border: 1px solid var(--pink-soft);
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(190, 80, 130, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(22px) scale(0.96);
  transition: opacity 0.6s ease 0.1s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s, box-shadow 0.6s ease;
}

.lock-modal.is-open .lock-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lock-modal.is-unlocked {
  background: rgba(244, 127, 167, 0.36);
}

.lock-modal.is-unlocked .lock-card {
  box-shadow: 0 30px 74px rgba(244, 127, 167, 0.55), 0 0 44px rgba(244, 127, 167, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.lock-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--rose-deep);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.lock-close:hover {
  transform: rotate(90deg);
  background: #ffffff;
}

.lock-close:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

.lock-deco {
  position: absolute;
  color: var(--rose);
  opacity: 0.5;
  font-size: 17px;
  pointer-events: none;
}

.lock-deco-tl {
  top: 18px;
  left: 18px;
}

.lock-deco-tr {
  top: 18px;
  right: 56px;
}

.lock-deco-bl {
  bottom: 16px;
  left: 18px;
}

.lock-deco-br {
  bottom: 16px;
  right: 18px;
}

.lock-deco-star {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  animation: lockTwinkle 3.2s ease-in-out infinite;
}

.lock-deco-bow {
  bottom: 18px;
  right: 52px;
  font-size: 20px;
  animation: ribbonFloat 6s ease-in-out infinite;
}

@keyframes lockTwinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: translateX(-50%) scale(0.85);
  }
  50% {
    opacity: 0.75;
    transform: translateX(-50%) scale(1.1);
  }
}

.lock-icon {
  position: relative;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-soft), var(--rose));
  color: #ffffff;
  font-size: 30px;
  box-shadow: 0 12px 28px rgba(214, 92, 138, 0.4);
  animation: lockGlow 2.8s ease-in-out infinite;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.lock-melody {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  user-select: none;
  pointer-events: none;
}

.lock-icon-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--rose-deep);
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(214, 92, 138, 0.5);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lock-icon.is-success {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  animation: none;
}

.lock-icon.is-success .lock-icon-badge {
  opacity: 1;
  transform: scale(1);
}

@keyframes lockGlow {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(214, 92, 138, 0.4);
  }
  50% {
    box-shadow: 0 12px 34px rgba(244, 127, 167, 0.75), 0 0 26px rgba(244, 127, 167, 0.6);
  }
}

.lock-icon.is-shaking,
.lock-modal.is-shaking .lock-card {
  animation: lockShake 0.4s ease;
}

.lock-title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 5vw, 26px);
  letter-spacing: 0.16em;
  color: var(--rose-deep);
}

.lock-sub {
  margin-top: 8px;
  font-size: clamp(15px, 3.6vw, 17px);
  color: var(--plum);
  opacity: 0.85;
}

.lock-sub-sub {
  margin-top: 2px;
  font-size: clamp(15px, 3.6vw, 17px);
  color: var(--rose-text);
}

.lock-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 26px auto 0;
}

.lock-input-wrap > i {
  font-size: 22px;
  color: var(--rose);
  pointer-events: none;
  opacity: 0.9;
  animation: lockTwinkle 3.2s ease-in-out infinite;
}

.lock-digits {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lock-digit {
  width: clamp(46px, 11vw, 58px);
  height: clamp(46px, 11vw, 58px);
  padding: 0;
  border: 2px solid var(--pink-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 6vw, 26px);
  text-align: center;
  color: var(--plum);
  caret-color: transparent;
  outline: none;
  box-shadow: inset 0 -4px 12px rgba(244, 127, 167, 0.08), 0 6px 18px rgba(190, 80, 130, 0.12);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.lock-digit::placeholder {
  color: var(--pink);
  opacity: 0.5;
  font-size: 1.2em;
  line-height: 1;
}

.lock-digit:focus {
  border-color: var(--rose);
  background: #ffffff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 0 4px rgba(244, 127, 167, 0.18), 0 0 22px rgba(244, 127, 167, 0.5), inset 0 -4px 12px rgba(214, 92, 138, 0.1);
}

.lock-digit:focus-visible {
  outline: none;
}

.lock-digit.has-value {
  border-color: var(--rose);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(244, 127, 167, 0.16), 0 6px 20px rgba(214, 92, 138, 0.18), inset 0 -4px 12px rgba(214, 92, 138, 0.08);
}

.lock-digits.is-shaking {
  animation: lockShake 0.4s ease;
}

.lock-digits.is-unlocked .lock-digit {
  border-color: var(--rose);
  color: var(--rose-deep);
  box-shadow: 0 0 0 3px rgba(244, 127, 167, 0.2), 0 0 24px rgba(244, 127, 167, 0.6), inset 0 -4px 12px rgba(214, 92, 138, 0.1);
}

.lock-digit:nth-child(2) {
  margin-right: 14px;
}

.lock-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  margin-top: 20px;
  padding: 13px 34px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--rose-deep) 100%);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 17px;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease;
}

.lock-btn i {
  font-size: 20px;
}

.lock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -12px rgba(214, 92, 138, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.lock-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.lock-btn:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
}

.lock-btn[disabled] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.lock-error {
  display: none;
  margin-top: 14px;
  font-size: 15px;
  color: var(--rose-deep);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lock-error.is-shown {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.lock-error .error-en {
  display: block;
  font-weight: 600;
}

.lock-error .error-th {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--rose-text);
}

.lock-success {
  display: none;
  margin-top: 14px;
  font-size: 16px;
  color: var(--rose-deep);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

.lock-success .success-en {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.lock-success .success-note {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--rose-text);
}

.lock-success.is-shown {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lock-hint {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--rose-text);
  opacity: 0.6;
}

.lock-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 18px;
  border: 1px solid var(--pink-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--rose-deep);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.lock-tip i {
  font-size: 16px;
}

.lock-tip:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(214, 92, 138, 0.2);
}

.lock-tip:active {
  transform: translateY(-1px) scale(0.97);
}

.lock-tip:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 2px;
}

.lock-tip[disabled] {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.lock-tip-text {
  margin-top: 10px;
  min-height: 18px;
  max-width: 330px;
  margin-left: auto;
  margin-right: auto;
  font-size: 14px;
  line-height: 1.6;
  color: var(--rose-deep);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lock-tip-text.is-shown {
  opacity: 1;
  transform: translateY(0);
}

@keyframes lockShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-7px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}

/* -------------------------------------------------------------------------
   Reduced motion
------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .page-home {
    animation: none;
  }

  .home-character,
  .birthday-character,
  .wish-character {
    animation: none !important;
  }

  .flame {
    animation: none !important;
  }

  .decor i,
  .decor-bow {
    animation: none !important;
  }

  .secret-line {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .secret-pixel-wrap,
  .secret-pixel-heart,
  .pixel-heart {
    animation: none !important;
  }

  .lock-icon,
  .lock-deco-star,
  .lock-deco-bow,
  .lock-modal.is-shaking .lock-card {
    animation: none !important;
  }

  .lock-input-wrap .is-shaking,
  .lock-digits.is-shaking {
    animation: none !important;
  }
}
