:root {
  --ink: #4a3036;
  --muted: #84636a;
  --rose: #d9778d;
  --rose-dark: #b85371;
  --blush: #f9e3e6;
  --cream: #fffaf4;
  --gold: #c99b4e;
  --gold-light: #f3d99c;
  --card: rgba(255, 253, 248, 0.88);
  --shadow: 0 18px 45px rgba(104, 57, 72, 0.16);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #f9e3e6; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Arial", "Heebo", "Noto Sans Hebrew", sans-serif;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.95) 0 4%, transparent 20%),
    radial-gradient(circle at 2% 86%, rgba(246, 209, 156, 0.46) 0 7%, transparent 27%),
    linear-gradient(145deg, #f5c9d2 0%, #f9e9e7 45%, #fbf3e7 100%);
}

button { font: inherit; }

button:focus-visible {
  outline: 3px solid #6e3950;
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.app-shell {
  position: relative;
  width: min(100%, 490px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 250, 244, 0.26);
  box-shadow: 0 0 60px rgba(114, 67, 78, 0.13);
}

.screen {
  min-height: 100svh;
  padding: max(26px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.intro::before,
.experience::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.62;
  background-image: radial-gradient(rgba(174, 96, 121, 0.16) 0.75px, transparent 0.75px);
  background-size: 9px 9px;
  pointer-events: none;
}

.intro-halo {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.halo-one { width: 240px; height: 240px; top: 2%; right: -92px; background: rgba(239, 183, 194, 0.68); }
.halo-two { width: 300px; height: 300px; bottom: -160px; left: -132px; background: rgba(247, 216, 157, 0.52); }

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.intro-photo-frame {
  position: relative;
  width: min(69vw, 285px);
  aspect-ratio: 0.86;
  margin: 3px 0 18px;
  padding: 10px 10px 28px;
  transform: rotate(2.2deg);
  background: #fffdf9;
  box-shadow: var(--shadow), 0 0 0 1px rgba(201, 155, 78, 0.24);
}

.intro-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.tape {
  position: absolute;
  width: 86px;
  height: 23px;
  opacity: 0.74;
  background: rgba(242, 203, 149, 0.8);
  transform: rotate(-5deg);
}

.tape-top { top: -10px; right: calc(50% - 43px); }

.sparkle { position: absolute; color: var(--gold); text-shadow: 0 2px 7px rgba(129, 73, 86, 0.24); }
.sparkle-one { top: 29px; left: -26px; font-size: 2rem; transform: rotate(-15deg); }
.sparkle-two { bottom: 2px; right: -22px; color: var(--rose); font-size: 1.7rem; }

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 13vw, 4.25rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

h1 span, h2 span { color: var(--rose-dark); }

.intro-copy {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  gap: 11px;
  padding: 13px 23px;
  color: white;
  background: linear-gradient(135deg, #d97891, #b85371);
  box-shadow: 0 10px 20px rgba(180, 83, 113, 0.27);
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 14px 24px rgba(180, 83, 113, 0.32); }
.primary-button:active, .secondary-button:active { transform: scale(0.98); }

.secondary-button {
  padding: 10px 17px;
  color: var(--rose-dark);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(198, 141, 152, 0.45);
}

.hint { margin: 15px 0 0; color: #a47a83; font-size: 0.75rem; }

.experience {
  position: relative;
  padding-right: 14px;
  padding-left: 14px;
}

.experience-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-button,
.reset-button {
  border: 0;
  cursor: pointer;
  color: var(--ink);
  background: transparent;
}

.brand-button {
  padding: 5px 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.brand-button span { color: var(--rose-dark); }
.reset-button { padding: 8px; color: #956d76; font-size: 0.76rem; text-decoration: underline; text-underline-offset: 3px; }

.stage-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  gap: 7px;
  width: 100%;
  margin: 0 auto 22px;
}

.stage-dot {
  position: relative;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  color: #9f7880;
  background: rgba(255, 255, 255, 0.48);
  font-size: 0.76rem;
  font-weight: 700;
}

.stage-dot.active { color: white; background: var(--rose); box-shadow: 0 5px 11px rgba(177, 84, 110, 0.22); }
.stage-dot.locked { cursor: not-allowed; color: #b9a1a5; background: rgba(255, 255, 255, 0.3); }
.stage-dot.locked::after { content: "🔒"; display: block; margin-top: 1px; font-size: 0.58rem; }

.stage { min-height: calc(100svh - 126px); }

.stage-intro { text-align: center; }
.stage-kicker { margin: 0 0 3px; color: var(--gold); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; }
.stage-intro h2 { margin-bottom: 5px; font-size: clamp(1.75rem, 8vw, 2.25rem); line-height: 1; }
.stage-intro p { margin-bottom: 19px; color: var(--muted); font-size: 0.92rem; }

.video-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(67svh, 595px);
  padding: 22px 0 43px;
}

.video-card {
  position: relative;
  z-index: 2;
  width: min(84vw, 360px);
  overflow: hidden;
  border: 7px solid #fffdf9;
  border-radius: 20px;
  background: #1f1920;
  box-shadow: 0 16px 34px rgba(75, 43, 51, 0.27), 0 0 0 1px rgba(201, 155, 78, 0.42);
}

.video-card::before {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  content: "♥ רק בשבילך";
  color: #6c4351;
  background: rgba(255, 250, 247, 0.86);
  font-size: 0.65rem;
  font-weight: 700;
  pointer-events: none;
}

.video-card video {
  display: block;
  width: 100%;
  max-height: min(57svh, 500px);
  background: #1c171c;
}

.collage { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

.photo {
  position: absolute;
  width: clamp(62px, 18vw, 88px);
  padding: 4px 4px 12px;
  overflow: hidden;
  background: #fffdf9;
  box-shadow: 0 7px 15px rgba(77, 44, 52, 0.2), 0 0 0 1px rgba(201, 155, 78, 0.25);
}

.photo img { display: block; width: 100%; aspect-ratio: 0.82; object-fit: cover; }
.photo-1 { top: 1%; right: -19px; transform: rotate(11deg); }
.photo-2 { top: 20%; left: -23px; transform: rotate(-11deg); }
.photo-3 { top: 48%; right: -27px; transform: rotate(8deg); }
.photo-4 { bottom: 6%; left: -21px; transform: rotate(10deg); }
.photo-5 { bottom: 0; right: 11%; transform: rotate(-7deg); }
.photo-2 img { object-position: center 25%; }

.reveal-card {
  position: relative;
  z-index: 4;
  width: min(77vw, 310px);
  padding: 28px 20px 24px;
  border: 1px solid rgba(201, 155, 78, 0.65);
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 252, 247, 0.94);
  box-shadow: var(--shadow);
}

.envelope {
  position: relative;
  width: 76px;
  height: 56px;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 2px solid #d88197;
  border-radius: 5px;
  background: #f6cfd8;
}

.envelope::before,
.envelope::after { position: absolute; content: ""; width: 56px; height: 56px; background: #fadfe4; }
.envelope::before { top: -39px; right: -4px; transform: rotate(45deg); border-bottom: 2px solid #d88197; }
.envelope::after { bottom: -40px; right: 10px; transform: rotate(45deg); border-top: 2px solid #d88197; }
.reveal-card h3 { margin: 0 0 8px; font-size: 1.38rem; }
.reveal-card p { margin-bottom: 18px; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.after-video {
  position: relative;
  z-index: 5;
  margin-top: 11px;
  text-align: center;
}

.watch-note { margin: 0; color: #8c6d74; font-size: 0.75rem; }
.completion-card { padding: 13px 10px 0; }
.completion-card p { margin: 0 0 9px; color: var(--rose-dark); font-size: 0.88rem; font-weight: 700; }

.final {
  display: grid;
  place-items: center;
  padding-right: 26px;
  padding-left: 26px;
  text-align: center;
}

.final-card {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 35px 22px 31px;
  overflow: hidden;
  border: 1px solid rgba(201, 155, 78, 0.6);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.final-card::before,
.final-card::after { position: absolute; color: rgba(207, 128, 147, 0.2); font-size: 5.4rem; line-height: 1; }
.final-card::before { top: -15px; right: -7px; content: "♥"; }
.final-card::after { bottom: -25px; left: -4px; content: "✦"; color: rgba(201, 155, 78, 0.22); }

.final-number { color: var(--gold); font-family: Georgia, "Times New Roman", serif; font-size: 4.8rem; line-height: 0.83; text-shadow: 0 3px 0 #f9efda; }
.final h2 { position: relative; z-index: 1; margin: 15px 0 13px; font-family: Georgia, "Times New Roman", serif; font-size: 2.15rem; font-weight: 500; line-height: 1.1; }
.final-card > p:not(.eyebrow) { position: relative; z-index: 1; margin-bottom: 24px; color: var(--muted); line-height: 1.62; }

.confetti { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -24px; width: 9px; height: 17px; border-radius: 2px; background: var(--rose); animation: fall var(--duration) var(--delay) linear infinite; }
.confetti i:nth-child(3n) { background: var(--gold); border-radius: 50%; }
.confetti i:nth-child(3n + 1) { background: #a9c9b3; transform: rotate(35deg); }

.password-card { max-width: 390px; }
.password-card > p:not(.eyebrow):not(.password-message) { position: relative; z-index: 1; margin-bottom: 20px; color: var(--muted); line-height: 1.55; }

.password-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.password-form input {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid rgba(201, 155, 78, 0.48);
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  text-align: center;
}

.password-form input:focus { border-color: var(--rose-dark); box-shadow: 0 0 0 3px rgba(217, 119, 141, 0.18); }
.password-form .primary-button { width: 100%; }
.password-message { position: relative; z-index: 1; min-height: 1.3em; margin: 12px 0 0; color: var(--rose-dark); font-size: 0.86rem; font-weight: 700; }

.surprise-reveal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, #f7ced7 0%, #fff5ea 49%, #f7d9aa 100%);
}

.surprise-reveal::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  opacity: 0.46;
  background-image: radial-gradient(rgba(174, 96, 121, 0.18) 0.8px, transparent 0.8px);
  background-size: 9px 9px;
}

.photo-storm { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.storm-photo {
  position: absolute;
  top: var(--top);
  left: var(--left);
  width: clamp(50px, 17vw, 82px);
  padding: 4px 4px 12px;
  overflow: hidden;
  background: #fffdf9;
  box-shadow: 0 8px 18px rgba(77, 44, 52, 0.22), 0 0 0 1px rgba(201, 155, 78, 0.24);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rotation)) scale(0.68);
  animation: photo-pop 520ms var(--delay) cubic-bezier(.2, .85, .25, 1.25) forwards;
}

.storm-photo img { display: block; width: 100%; aspect-ratio: 0.79; object-fit: cover; }
.storm-photo:nth-child(3n) img { object-position: center 25%; }

.surprise-copy {
  position: relative;
  z-index: 2;
  width: min(72vw, 340px);
  padding: 19px 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 23px;
  text-align: center;
  background: rgba(255, 252, 247, 0.81);
  box-shadow: 0 12px 32px rgba(87, 45, 58, 0.17);
  backdrop-filter: blur(6px);
}

.surprise-copy .eyebrow { margin-bottom: 7px; }
.surprise-copy h2 { margin-bottom: 9px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.68rem, 8.5vw, 2.3rem); font-weight: 500; line-height: 1.05; }
.surprise-copy > p:not(.eyebrow) { margin: 0 0 12px; color: var(--rose-dark); font-size: 0.84rem; font-weight: 700; }

.music-button,
.replay-link {
  border: 0;
  cursor: pointer;
  color: var(--rose-dark);
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.music-button { padding: 7px 11px; border: 1px solid rgba(201, 155, 78, 0.5); border-radius: 999px; background: rgba(255,255,255,0.62); font-size: 0.79rem; }
.replay-link { position: absolute; z-index: 2; right: 50%; bottom: max(17px, env(safe-area-inset-bottom)); transform: translateX(50%); padding: 7px 13px; border-radius: 999px; background: rgba(255,255,255,0.7); font-size: 0.75rem; white-space: nowrap; }

.birthday-song { position: absolute; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes photo-pop {
  to { opacity: 1; transform: translate(-50%, -50%) rotate(var(--rotation)) scale(1); }
}

@keyframes fall { to { transform: translate3d(var(--drift), 108svh, 0) rotate(540deg); } }

@media (min-width: 440px) {
  .screen { padding-right: 24px; padding-left: 24px; }
  .experience { padding-right: 20px; padding-left: 20px; }
  .photo { width: 86px; }
}

@media (max-height: 680px) {
  .intro-photo-frame { width: min(51vw, 230px); margin-bottom: 12px; }
  .intro-copy { margin-bottom: 16px; }
  .video-zone { min-height: 490px; }
  .video-card video { max-height: 48svh; }
}

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