
/* =========================================
   BIRTHDAY SURPRISE WEBSITE
   Pastel scrapbook theme
========================================= */

:root {
  --ink: #5c3a4e;
  --ink-soft: #7a556c;
  --rose: #e989ab;
  --rose-deep: #d46b90;
  --blush: #ffe4ef;
  --cream: #fff6ea;
  --paper: #fffaf4;
  --lavender: #e6d8f7;
  --lavender-deep: #c9b0e8;
  --sky: #d7eef8;
  --sky-deep: #9fd0e6;
  --mint: #d9f3e4;

  --shadow: 0 14px 40px rgba(120, 70, 95, 0.12);

  --hand: "Caveat", "Segoe Script", cursive;
  --body: "Nunito", "Segoe UI", sans-serif;

  --radius: 28px;
}


/* =========================================
   GLOBAL RESET
========================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow: hidden;
  max-width: 100%;
}

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

  background:
    radial-gradient(900px 500px at 8% -10%, #ffd6e8 0%, transparent 60%),
    radial-gradient(800px 480px at 110% 8%, #ddd0f8 0%, transparent 55%),
    radial-gradient(700px 500px at 50% 120%, #d5f0fb 0%, transparent 50%),
    linear-gradient(
      180deg,
      #fff8f3 0%,
      #fdeef5 48%,
      #f3f7ff 100%
    );
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;

  background-image:
    radial-gradient(
      rgba(214, 140, 168, 0.35) 0.7px,
      transparent 0.7px
    );

  background-size: 18px 18px;
  z-index: 0;
}

button,
input {
  font-family: inherit;
}

h1,
h2 {
  font-family: var(--hand);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0;
}

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.78em;
  overflow-wrap: anywhere;
}


/* =========================================
   BACKGROUND DECORATIONS
========================================= */

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

.heart,
.star {
  position: absolute;
  color: #f2a3c0;
  opacity: 0.75;
  animation: floaty 7s ease-in-out infinite;
}

.star {
  color: #c9b4ee;
  animation-name: twinkle;
}

.h1 {
  left: 6%;
  top: 12%;
  font-size: 28px;
}

.h2 {
  right: 8%;
  top: 18%;
  font-size: 22px;
  animation-delay: -2s;
}

.h3 {
  left: 14%;
  bottom: 16%;
  font-size: 20px;
  animation-delay: -3s;
}

.h4 {
  right: 12%;
  bottom: 20%;
  font-size: 30px;
  animation-delay: -1s;
}

.h5 {
  left: 46%;
  top: 8%;
  font-size: 16px;
  animation-delay: -4s;
}

.s1 {
  left: 22%;
  top: 22%;
  font-size: 14px;
}

.s2 {
  right: 20%;
  top: 36%;
  font-size: 16px;
  animation-delay: -1.5s;
}

.s3 {
  left: 8%;
  top: 58%;
  font-size: 12px;
  animation-delay: -2.4s;
}

.s4 {
  right: 6%;
  bottom: 32%;
  font-size: 18px;
  animation-delay: -3.2s;
}

.s5 {
  left: 38%;
  bottom: 10%;
  font-size: 13px;
  animation-delay: -0.8s;
}


/* =========================================
   MAIN APP AND SCREEN NAVIGATION
========================================= */

.app {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;

  overflow-x: hidden;
  overflow-y: auto;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(16px);

  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    visibility 0.45s;

  padding:
    max(12px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  z-index: 1;
}

#gallery,
#letter {
  overflow: hidden;
}


/* =========================================
   COMMON LAYOUTS
========================================= */

.stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  gap: clamp(0.6rem, 2vh, 1.1rem);

  width: min(760px, 100%);
  margin: 0 auto;
}

.stage-center {
  width: min(760px, 100%);
}

.stage-video {
  width: min(920px, 100%);
}

.stage-rules {
  width: min(680px, 100%);
}

.stage-question {
  width: min(640px, 100%);
}


/* =========================================
   HEADINGS AND TEXT
========================================= */

.eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  color: #6d3b55;
}

h2 {
  color: #6d3b55;
}

.lead,
.caption,
.gift-blurb {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38rem;
}

.caption {
  margin-top: 0.2rem;
}


/* =========================================
   BUTTONS
========================================= */

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;

  border-radius: 999px;
  padding: 0.85em 1.45em;

  font-weight: 800;
  font-size: 1rem;

  color: #6a3048;

  background:
    linear-gradient(
      180deg,
      #ffd7e8 0%,
      #f4a9c6 100%
    );

  box-shadow:
    0 7px 0 #e59ab8,
    0 12px 24px rgba(180, 90, 120, 0.16);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

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

.btn:active {
  transform: translateY(3px);

  box-shadow:
    0 3px 0 #e59ab8,
    0 6px 12px rgba(180, 90, 120, 0.12);
}

.btn:focus-visible {
  outline: 3px solid #e48aaa;
  outline-offset: 3px;
}

.btn-primary {
  background:
    linear-gradient(
      180deg,
      #ffd7e8 0%,
      #f4a9c6 100%
    );
}

.btn-yes {
  background:
    linear-gradient(
      180deg,
      #d9f8e4 0%,
      #9eddb6 100%
    );

  box-shadow:
    0 7px 0 #7ec99a,
    0 12px 24px rgba(80, 140, 110, 0.16);

  color: #215c3a;
}

.btn-yes:active {
  box-shadow: 0 3px 0 #7ec99a;
}

.btn-no {
  background:
    linear-gradient(
      180deg,
      #ffe7c7 0%,
      #f3c08a 100%
    );

  box-shadow:
    0 7px 0 #e0a86a,
    0 12px 24px rgba(170, 120, 60, 0.16);

  color: #7a4a16;
}

.btn-no:active {
  box-shadow: 0 3px 0 #e0a86a;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);

  box-shadow:
    0 7px 0 #ead7e2,
    0 10px 18px rgba(120, 70, 95, 0.08);

  color: var(--ink);
}

.btn-ghost:active {
  box-shadow: 0 3px 0 #ead7e2;
}

.btn-small {
  padding: 0.4em 0.7em;
  font-size: clamp(0.68rem, 1.5vw, 0.88rem);
  box-shadow: 0 4px 0 #e59ab8;
  flex-shrink: 0;
}

.btn-small:active {
  box-shadow: 0 2px 0 #e59ab8;
}


/* =========================================
   WELCOME PAGE
========================================= */

.hero-card {
  width: min(680px, 100%);

  background: rgba(255, 252, 248, 0.84);

  border-radius: 36px;

  padding:
    clamp(1.4rem, 4vw, 2.6rem)
    clamp(1.1rem, 4vw, 2.3rem);

  box-shadow: var(--shadow);

  border: 3px solid #fff;
  outline: 2px dashed #f3c3d8;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: clamp(0.7rem, 2vh, 1rem);
}

.welcome-doodles {
  display: flex;
  gap: 1.2rem;
  font-size: 1.5rem;
  color: #e7a0c0;
}

.doodle {
  animation: wobble 4.5s ease-in-out infinite;
  display: inline-block;
}

.doodle.ribbon {
  animation-delay: -1s;
  color: #b9a0e4;
}

.doodle.star {
  animation-delay: -2s;
  color: #8ec6de;
}

.welcome-stickers {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.welcome-sticker {
  position: relative;
  width: clamp(72px, 12vw, 110px);
  animation: wobble 5s ease-in-out infinite;
}

.welcome-sticker:nth-child(2) {
  animation-delay: -1.6s;
}


/* =========================================
   BIRTHDAY VIDEO PAGE
========================================= */

.video-frame {
  position: relative;
  width: min(100%, 860px);

  background: var(--paper);

  border-radius: 24px;
  padding: clamp(0.5rem, 1.5vw, 0.85rem);

  box-shadow: var(--shadow);

  border: 3px solid #fff;
  outline: 2px dashed #f3c3d8;
}

.video-frame video {
  display: block;
  width: 100%;
  max-height: min(52svh, 520px);

  border-radius: 16px;

  background: #2b2030;
  object-fit: contain;
}

.video-fallback {
  min-height: min(42svh, 360px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 0.4rem;

  border-radius: 16px;

  background:
    repeating-linear-gradient(
      135deg,
      #fff 0 12px,
      #fff1f6 12px 24px
    );

  color: var(--ink-soft);
  padding: 1.2rem;
}

.video-fallback[hidden],
.video-unlock[hidden],
.no-reaction[hidden] {
  display: none;
}

.fine {
  font-size: 0.85rem;
  max-width: 26rem;
}

.video-unlock {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}


/* =========================================
   YES / NO QUESTION PAGE
========================================= */

.choice-row {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: clamp(0.8rem, 3vw, 2rem);

  width: 100%;
}

.no-zone {
  position: relative;
  width: min(46vw, 220px);
  height: 112px;
  flex: 0 0 auto;
}

#no-btn {
  position: absolute;
  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);
  z-index: 1;
}

#no-btn.is-dodging {
  transform: none;
}

.no-reaction {
  width: min(100%, 420px);

  background: rgba(255, 250, 244, 0.9);

  border-radius: 24px;
  padding: 0.9rem 1rem 1.1rem;

  box-shadow: var(--shadow);

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 0.7rem;

  animation: pop 0.35s ease;
}

.tantrum {
  width: min(180px, 46vw);
  margin: 0;
}

.no-reaction p {
  font-family: var(--hand);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.2;
}


/* =========================================
   BIRTHDAY LETTER PAGE
========================================= */

.letter-layout {
  position: relative;

  height: 100%;
  max-width: 1100px;

  margin: 0 auto;

  display: flex;
  flex-direction: column;

  min-height: 0;

  gap: clamp(0.35rem, 1.2vh, 0.8rem);
}

.letter-head,
.letter-actions {
  position: relative;
  z-index: 3;

  text-align: center;
  flex-shrink: 0;
}

.letter-head h1 {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.letter-stickers {
  position: absolute;
  inset: 0;

  pointer-events: none;
  z-index: 1;
}

.letter-paper {
  position: relative;
  z-index: 2;

  width: min(640px, 100%);

  margin: 0 auto;

  flex: 1;
  min-height: 0;
  overflow: auto;

  background: var(--paper);
  color: #5a3e4c;

  border-radius: 18px 26px 20px 22px;

  padding:
    clamp(1.3rem, 3vw, 2.2rem)
    clamp(1.15rem, 3vw, 2.4rem);

  box-shadow:
    var(--shadow),
    0 0 0 10px rgba(255, 255, 255, 0.35);

  text-align: left;
  line-height: 1.65;
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);

  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.4),
      transparent 40px
    ),
    repeating-linear-gradient(
      transparent,
      transparent 31px,
      rgba(232, 186, 204, 0.35) 32px
    );
}

.letter-paper p {
  margin: 0 0 0.9rem;
}

.salutation,
.signature,
.signoff {
  font-family: var(--hand);
  font-size: 1.7rem;
  line-height: 1.25;
  color: #7a4060;
}

.tape {
  position: sticky;
  top: 8px;
  height: 0;
}

.tape::after {
  content: "";
  position: absolute;

  width: 86px;
  height: 22px;

  background: rgba(255, 214, 232, 0.85);

  transform: rotate(-8deg);

  box-shadow: 0 4px 8px rgba(180, 100, 130, 0.12);
}

.tape-left::after {
  left: 12px;
}

.tape-right::after {
  right: 12px;
  left: auto;

  transform: rotate(7deg);

  background: rgba(210, 228, 250, 0.9);
}

.letter-paper::-webkit-scrollbar {
  width: 10px;
}

.letter-paper::-webkit-scrollbar-thumb {
  background: #f3c0d4;
  border-radius: 99px;
}


/* =========================================
   STICKERS
========================================= */

.sticker {
  position: absolute;

  width: var(--size, 92px);
  margin: 0;

  transform: rotate(var(--tilt, 0deg));

  animation: wobble 6s ease-in-out infinite;

  filter: drop-shadow(
    0 8px 8px rgba(120, 70, 90, 0.12)
  );
}

.sticker img {
  width: 100%;
  height: auto;

  display: block;
  object-fit: contain;
}

.sticker.s1 {
  --size: 108px;
  --tilt: -10deg;
  top: 8%;
  left: 1%;
}

.sticker.s2 {
  --size: 96px;
  --tilt: 8deg;
  top: 14%;
  right: 2%;
  animation-delay: -1s;
}

.sticker.s3 {
  --size: 90px;
  --tilt: 6deg;
  bottom: 16%;
  left: 2%;
  animation-delay: -2s;
}

.sticker.s4 {
  --size: 112px;
  --tilt: -6deg;
  bottom: 12%;
  right: 1%;
  animation-delay: -2.6s;
}

.sticker.s5 {
  --size: 78px;
  --tilt: -4deg;
  top: 42%;
  left: 0;
  animation-delay: -3s;
}

.sticker.s6 {
  --size: 84px;
  --tilt: 12deg;
  top: 46%;
  right: 0;
  animation-delay: -1.4s;
}


/* =========================================
   GIFT GALLERY PAGE
========================================= */

.gallery-layout {
  height: 100%;

  display: flex;
  flex-direction: column;

  min-height: 0;

  gap: clamp(0.25rem, 1vh, 0.6rem);

  width: min(1080px, 100%);
  margin: 0 auto;

  position: relative;
}

.gallery-head,
.gallery-actions {
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.gallery-head h1 {
  font-size: clamp(1.8rem, 4.4vh, 3.3rem);
}

.gallery-note {
  color: var(--ink-soft);
  font-size: clamp(0.82rem, 1.8vh, 1rem);
  margin-top: 0.2rem;
}

.gift-grid {
  flex: 1;
  min-height: 0;

  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));

  gap: clamp(0.35rem, 1.2vh, 0.85rem);

  position: relative;
  z-index: 1;
}

.gift-card {
  min-width: 0;
  min-height: 0;

  display: flex;
  flex-direction: column;

  gap: clamp(0.15rem, 0.6vh, 0.35rem);

  padding: clamp(0.35rem, 0.8vh, 0.65rem);

  background: rgba(255, 252, 248, 0.92);

  border-radius: 18px;
  border: 2px dashed #f3c3d8;

  box-shadow: 0 8px 20px rgba(120, 70, 95, 0.08);

  position: relative;
  overflow: hidden;

  transition: transform 0.18s ease;
}

.gift-card:nth-child(2) {
  border-color: #d9c6f3;
}

.gift-card:nth-child(3) {
  border-color: #b7dff0;
}

.gift-card:nth-child(4) {
  border-color: #f3d7a8;
}

.gift-card:nth-child(5) {
  border-color: #b7e4cb;
}

.gift-card:nth-child(6) {
  border-color: #f0b6cb;
}

.gift-card:hover {
  transform: translateY(-3px);
}

.gift-card .photo-frame {
  flex: 1;
  min-height: 0;

  border-radius: 12px;

  background:
    linear-gradient(
      160deg,
      var(--blush),
      var(--lavender)
    );
}

.gift-card h2 {
  font-size: clamp(1.05rem, 2.4vh, 1.55rem);
  line-height: 1;
  flex-shrink: 0;
}

.gift-card p {
  font-size: clamp(0.68rem, 1.5vh, 0.86rem);
  color: var(--ink-soft);

  flex-shrink: 0;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-card .btn {
  align-self: center;
}


/* =========================================
   MOVING GALLERY STICKERS
========================================= */

.gallery-stickers {
  position: absolute;
  inset: 0;

  pointer-events: none;
  z-index: 3;
}

.gallery-sticker {
  position: absolute;

  width: clamp(48px, 7vw, 82px);
  height: auto;

  object-fit: contain;

  filter: drop-shadow(
    0 6px 8px rgba(120, 70, 90, 0.15)
  );
}

.gallery-sticker-one {
  top: 16%;
  left: -1%;

  animation: galleryFloat 4s ease-in-out infinite;
}

.gallery-sticker-two {
  top: 14%;
  right: -1%;

  animation: galleryFloat 4.8s ease-in-out infinite reverse;
}

.gallery-sticker-three {
  bottom: 9%;
  right: 2%;

  animation: galleryFloat 4.2s ease-in-out infinite;
  animation-delay: -1.5s;
}

.gallery-sticker-four {
  bottom: 9%;
  left: 25%;

  animation: galleryFloat 4.2s ease-in-out infinite;
  animation-delay: -1.5s;
}

.gallery-sticker-five {
  top: 16%;
  right: 33%;

  animation: galleryFloat 4.2s ease-in-out infinite;
  animation-delay: -1.5s;
}

.gallery-sticker-six {
  bottom: 9%;
  left: 56%;

  animation: galleryFloat 4.2s ease-in-out infinite;
  animation-delay: -1.5s;
}


/* =========================================
   INSTRUCTIONS PAGE
========================================= */

.rules {
  list-style: none;
  margin: 0;
  padding: 0;

  width: 100%;

  display: flex;
  flex-direction: column;

  gap: 0.7rem;
  text-align: left;
}

.rules li {
  display: flex;
  gap: 0.8rem;
  align-items: center;

  background: rgba(255, 250, 244, 0.88);

  border-radius: 18px;
  padding: 0.75rem 0.9rem;

  box-shadow: var(--shadow);
}

.rules p {
  color: var(--ink-soft);
  line-height: 1.4;
}

.rule-num {
  flex: 0 0 auto;

  width: 2.2rem;
  height: 2.2rem;

  border-radius: 50%;

  display: grid;
  place-items: center;

  font-family: var(--hand);
  font-size: 1.4rem;

  background: var(--lavender);
  color: #62457a;
}

.rules li:nth-child(2) .rule-num {
  background: var(--sky);
  color: #2e6278;
}

.rules li:nth-child(3) .rule-num {
  background: var(--blush);
  color: #8a4060;
}

.rule-doodles {
  letter-spacing: 0.6rem;
  color: #e09ab6;
  font-size: 1.2rem;
}


/* =========================================
   GIFT PAGES: COMMON LAYOUT
========================================= */

.gift-screen {
  overflow: hidden;
}

.gift-layout {
  height: 100%;
  min-height: 0;

  width: min(980px, 100%);
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  gap: clamp(0.4rem, 1.5vh, 0.9rem);
}

.gift-copy {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 0.7rem;

  max-width: 34rem;
}

.gift-copy p,
.gift-blurb {
  line-height: 1.5;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 2vh, 1.12rem);
}

.gift-photo {
  width: min(100%, 680px);

  flex: 1 1 auto;
  min-height: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-nav {
  display: flex;
  flex-wrap: wrap;

  gap: 0.6rem;
  justify-content: center;

  flex-shrink: 0;
}


/* =========================================
   IMAGE AND VIDEO FRAMES
========================================= */

.photo-frame {
  position: relative;
  overflow: hidden;
}

.photo-frame img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  display: block;
}

/* Shared video sizing for all five video gifts */

.gift-video {
  display: block;

  width: 100%;
  height: 100%;

  min-width: 0;
  min-height: 0;

  object-fit: contain;

  background: #241d28;
  border-radius: inherit;
}

/* Image fallback */

.photo-fallback {
  display: none;

  position: absolute;
  inset: 0;

  margin: 0;
  padding: 0.4rem;

  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 0.2rem;

  text-align: center;

  background:
    linear-gradient(
      160deg,
      rgba(255, 228, 239, 0.95),
      rgba(215, 238, 248, 0.95)
    );

  color: var(--ink-soft);

  font-size: clamp(0.62rem, 1.4vw, 0.8rem);
  line-height: 1.3;
}

.photo-frame.is-missing img {
  display: none;
}

.photo-frame.is-missing .photo-fallback {
  display: flex;
}

.sticker .photo-fallback {
  position: relative;
  inset: auto;

  min-height: 72px;

  border-radius: 16px;
  border: 2px dashed #e7b4c8;
}


/* =========================================
   GIFT FRAME STYLES
========================================= */

.frame-rose,
.frame-banner,
.frame-ticket,
.frame-glow,
.frame-polaroid {
  width: min(100%, 640px);

  height: 100%;
  max-height: 100%;

  border-radius: 24px;

  background: #fff;
}

.frame-rose {
  border: 8px solid #fff;
  outline: 3px solid #f4b6cd;
}

.frame-banner {
  border-radius: 28px 28px 8px 8px;
  border-bottom: 10px solid #b7dff0;
}

.frame-ticket {
  border-radius: 18px;

  background:
    radial-gradient(
      circle at 0 50%,
      transparent 12px,
      #fff 13px
    ) left / 51% 100% no-repeat,

    radial-gradient(
      circle at 100% 50%,
      transparent 12px,
      #fff 13px
    ) right / 51% 100% no-repeat;

  border: 2px dashed #9ed9bf;
}

.frame-glow {
  border: 8px solid rgba(255, 255, 255, 0.8);

  box-shadow:
    0 0 0 6px rgba(255, 214, 232, 0.7),
    var(--shadow);
}


/* Gift 2: Polaroid frame */

.frame-polaroid {
  height: auto;
  width: min(100%, 420px);

  max-height: 100%;

  padding: 0.7rem 0.7rem 2.4rem;

  background: #fff;

  transform: rotate(-2.5deg);
  border-radius: 8px;
}

.frame-polaroid .gift-video {
  width: 100%;
  height: auto;

  aspect-ratio: 4 / 3;

  max-height: min(40svh, 380px);

  object-fit: contain;
  border-radius: 4px;
}

.polaroid-caption {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0.45rem;

  font-family: var(--hand);
  font-size: 1.35rem;

  color: #8a5070;
  text-align: center;
}


/* =========================================
   GIFT 4: RECTANGULAR VIDEO FRAME
========================================= */

/*
   Gift 4 uses frame-banner, not frame-circle.
   This keeps the video rectangular and gives it
   the same video proportions as the other gifts.
*/

#gift-4 .gift-photo {
  width: min(100%, 640px);
}

#gift-4 .frame-banner {
  width: 100%;
  height: 100%;

  max-height: min(58svh, 540px);

  border-radius: 28px 28px 8px 8px;
}

#gift-4 .gift-video {
  width: 100%;
  height: 100%;

  object-fit: contain;
  border-radius: inherit;
}


/* =========================================
   GIFT PAGE BACKGROUND THEMES
========================================= */

.tone-rose {
  background:
    linear-gradient(
      180deg,
      rgba(255, 228, 239, 0.55),
      rgba(255, 246, 234, 0.2)
    );
}

.tone-lavender {
  background:
    linear-gradient(
      180deg,
      rgba(230, 216, 247, 0.65),
      rgba(255, 246, 234, 0.25)
    );
}

.tone-sky {
  background:
    linear-gradient(
      180deg,
      rgba(215, 238, 248, 0.7),
      rgba(255, 250, 244, 0.3)
    );
}

.tone-cream {
  background:
    linear-gradient(
      180deg,
      rgba(255, 236, 210, 0.65),
      rgba(255, 250, 244, 0.3)
    );
}

.tone-mint {
  background:
    linear-gradient(
      180deg,
      rgba(217, 243, 228, 0.7),
      rgba(255, 250, 244, 0.25)
    );
}

.tone-night {
  background:
    radial-gradient(
      500px 240px at 50% 0%,
      rgba(255, 210, 228, 0.7),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(236, 228, 252, 0.8),
      rgba(255, 246, 250, 0.4)
    );
}


/* =========================================
   FINAL BIRTHDAY PAGE
========================================= */

.gift-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gift-stars span {
  position: absolute;

  color: #e7b15a;

  animation: twinkle 2.8s ease-in-out infinite;

  font-size: 1.1rem;
}

.gift-stars span:nth-child(1) {
  top: 12%;
  left: 10%;
}

.gift-stars span:nth-child(2) {
  top: 20%;
  right: 12%;
  animation-delay: -0.6s;
}

.gift-stars span:nth-child(3) {
  bottom: 18%;
  left: 14%;
  animation-delay: -1.2s;
}

.gift-stars span:nth-child(4) {
  top: 40%;
  right: 8%;
  animation-delay: -1.8s;
}

.gift-stars span:nth-child(5) {
  bottom: 12%;
  right: 18%;
  animation-delay: -0.4s;
}

.finale-actions {
  display: flex;
  flex-wrap: wrap;

  gap: 0.7rem;
  justify-content: center;
}


/* =========================================
   GIFT REQUEST PAGE
========================================= */

.gift-request-stage {
  width: min(720px, 100%);
}

.gift-request-card {
  width: min(640px, 100%);

  padding: clamp(1.5rem, 5vw, 3rem);

  background: rgba(255, 252, 248, 0.9);

  border: 3px solid #fff;
  outline: 2px dashed #f3c3d8;

  border-radius: 32px;

  box-shadow: var(--shadow);

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 1rem;
}

.gift-request-card h1 {
  font-size: clamp(2.2rem, 6vw, 3.7rem);
}

.gift-request-form {
  display: flex;
  align-items: stretch;
  justify-content: center;

  width: 100%;

  gap: 0.65rem;
  margin-top: 0.5rem;
}

.gift-request-input {
  flex: 1;
  min-width: 0;

  padding: 0.9rem 1.1rem;

  border: 2px solid #f0bfd2;
  border-radius: 999px;

  background: #fff;

  color: var(--ink);

  font-size: 1rem;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.gift-request-input:focus {
  border-color: #df8eae;

  box-shadow:
    0 0 0 4px rgba(233, 137, 171, 0.15);
}

.gift-request-input::placeholder {
  color: #b99aaa;
}

.gift-request-response {
  width: 100%;
  text-align: center;
}

.gift-request-response p {
  color: var(--ink-soft);
  line-height: 1.5;
  font-weight: 700;
}


/* =========================================
   MOKOBARA REJECTION PAGE
========================================= */

.mokobara-denied-stage {
  width: min(760px, 100%);
}

.mokobara-denied-card {
  width: min(650px, 100%);

  padding: clamp(1.4rem, 4vw, 2.6rem);

  background: rgba(255, 250, 244, 0.92);

  border-radius: 34px;

  border: 3px solid #fff;
  outline: 2px dashed #f0b2c9;

  box-shadow: var(--shadow);

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: clamp(0.7rem, 2vh, 1.1rem);

  animation: pop 0.5s ease;
}

.mokobara-denied-card h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: #a94d70;
}

.mokobara-denied-card .lead {
  max-width: 32rem;
}

.mokobara-sticker {
  width: clamp(140px, 30vw, 230px);
  height: clamp(140px, 30vw, 230px);

  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: visible;

  background: transparent;
  border: 0;

  filter: drop-shadow(
    0 10px 12px rgba(120, 70, 90, 0.12)
  );

  animation: tantrumBounce 2.2s ease-in-out infinite;
}

.mokobara-sticker img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

.mokobara-sticker .photo-fallback {
  position: relative;
  inset: auto;

  min-height: 100px;
  width: 100%;

  border: 2px dashed #e7b4c8;
  border-radius: 18px;
}

.mokobara-extra-message {
  font-family: var(--hand);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: #8a5070;
  line-height: 1.25;
}


/* =========================================
   CONFETTI
========================================= */

.confetti-layer {
  position: fixed;
  inset: 0;

  pointer-events: none;
  overflow: hidden;

  z-index: 20;
}

.confetti-piece {
  position: absolute;
  top: -16px;

  width: 10px;
  height: 14px;

  border-radius: 2px;

  animation-name: confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}


/* =========================================
   ANIMATIONS
========================================= */

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }

  50% {
    transform: translateY(-14px) rotate(8deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.9;
    transform: scale(1);
  }

  50% {
    opacity: 0.25;
    transform: scale(0.7);
  }
}

@keyframes wobble {
  0%,
  100% {
    transform:
      rotate(var(--tilt, -3deg))
      translateY(0);
  }

  50% {
    transform:
      rotate(calc(var(--tilt, -3deg) + 4deg))
      translateY(-6px);
  }
}

@keyframes pop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes confetti-fall {
  to {
    transform: translateY(105vh) rotate(540deg);
    opacity: 0.85;
  }
}

@keyframes galleryFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }

  50% {
    transform: translateY(-13px) rotate(8deg);
  }
}

@keyframes tantrumBounce {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg) scale(1);
  }

  25% {
    transform: translateY(-9px) rotate(5deg) scale(1.04);
  }

  50% {
    transform: translateY(2px) rotate(-5deg) scale(0.98);
  }

  75% {
    transform: translateY(-5px) rotate(4deg) scale(1.02);
  }
}


/* =========================================
   DESKTOP LAYOUT
========================================= */

@media (min-width: 860px) {

  .gift-split {
    display: grid;

    grid-template-columns:
      minmax(0, 1.15fr)
      minmax(260px, 0.85fr);

    align-items: center;
    text-align: left;

    gap: clamp(1rem, 3vw, 2.5rem);
  }

  .gift-split .gift-copy {
    align-items: flex-start;
  }

  .gift-split .gift-photo {
    height: min(68svh, 560px);
    width: 100%;
  }

  .gift-split-reverse .gift-copy {
    order: -1;
  }

}


/* =========================================
   TABLET LAYOUT
========================================= */

@media (max-width: 860px) {

  .gallery-sticker-one {
    left: 0;
  }

  .gallery-sticker-two {
    right: 0;
  }

  .gift-grid {
    gap: 0.45rem;
  }

}


/* =========================================
   MOBILE LAYOUT
========================================= */

@media (max-width: 760px) {

  .letter-stickers {
    position: relative;
    inset: auto;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 0.35rem;

    height: auto;
    order: -1;
  }

  .sticker {
    position: relative;

    top: auto;
    right: auto;
    bottom: auto;
    left: auto;

    --size: 58px;
  }

  .letter-layout {
    display: flex;
  }

  .gift-layout {
    gap: 0.55rem;
  }

  .gift-photo {
    width: 100%;
  }

  .gift-video {
    max-height: 48svh;
  }

  #gift-4 .frame-banner {
    max-height: 48svh;
  }

  .mokobara-denied-card {
    gap: 0.7rem;
  }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 560px) {

  .choice-row {
    flex-direction: column;
  }

  .no-zone {
    width: min(100%, 240px);
  }

  h1 {
    font-size: clamp(2.05rem, 11vw, 3rem);
  }

  .gallery-note {
    display: none;
  }

  .gift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  .gift-card {
    padding: 0.35rem;
  }

  .gift-card h2 {
    font-size: clamp(0.95rem, 4vw, 1.25rem);
  }

  .gift-card p {
    font-size: 0.68rem;
  }

  .gallery-sticker {
    width: 48px;
  }

  .gallery-sticker-one {
    top: 15%;
    left: 0;
  }

  .gallery-sticker-two {
    top: 15%;
    right: 0;
  }

  .gallery-sticker-three {
    bottom: 5%;
    right: 0;
  }

  .gift-request-form {
    flex-direction: column;
  }

  .gift-request-input {
    width: 100%;
  }

  .gift-request-form .btn {
    width: 100%;
  }

  .finale-actions {
    flex-direction: column;
    width: min(100%, 300px);
  }

  .finale-actions .btn {
    width: 100%;
  }

  .mokobara-denied-card {
    padding: 1.3rem 1rem;
  }

}


/* =========================================
   SHORT SCREENS
========================================= */

@media (max-height: 760px) {

  .gift-card p {
    display: none;
  }

  .welcome-doodles {
    display: none;
  }

  .lead {
    font-size: 0.98rem;
  }

  .gift-request-card {
    padding: 1.3rem;
    gap: 0.7rem;
  }

  .mokobara-sticker {
    width: clamp(110px, 22vh, 170px);
    height: clamp(110px, 22vh, 170px);
  }

}


/* =========================================
   VERY SMALL SCREENS
========================================= */

@media (max-width: 380px) {

  .gift-card h2 {
    font-size: 0.95rem;
  }

  .btn-small {
    font-size: 0.66rem;
    padding: 0.32em 0.45em;
  }

  .sticker {
    --size: 48px;
  }

  .gift-request-card h1 {
    font-size: 2rem;
  }

}


/* =========================================
   ACCESSIBILITY: REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .screen {
    transform: none;
  }

  .gift-card:hover,
  .btn:hover {
    transform: none;
  }

  .frame-polaroid {
    transform: none;
  }

}
