:root {
  color-scheme: light;
  --paper: #f8f1e8;
  --paper-deep: #efe2d3;
  --ink: #4b3938;
  --muted: #917b75;
  --rose: #b85d70;
  --rose-dark: #91485a;
  --green: #687760;
  --line: rgba(103, 76, 70, .19);
  --shadow: 0 25px 80px rgba(94, 60, 50, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 15%, rgba(226, 192, 179, .38), transparent 34rem),
    radial-gradient(ellipse at 89% 84%, rgba(207, 212, 188, .36), transparent 30rem),
    var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}
.page-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 42px 20px 26px;
  overflow: hidden;
}
.topline, .footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--muted);
  font: 10px/1.5 Arial, Helvetica, sans-serif;
  letter-spacing: .2em;
  text-align: center;
}
.topline { margin-bottom: 25px; }
.topline span { color: var(--rose); font-size: 14px; }
.countdown-card {
  position: relative;
  width: min(100%, 660px);
  padding: clamp(30px, 6vw, 62px) clamp(22px, 7vw, 70px) 35px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.9);
  outline: 1px solid var(--line);
  outline-offset: -10px;
  border-radius: 5px 5px 3px 3px;
  background: rgba(255, 251, 245, .8);
  box-shadow: var(--shadow);
  animation: card-arrive .8s ease both;
}
.countdown-card::before, .countdown-card::after {
  position: absolute;
  content: "";
  width: 82px;
  height: 22px;
  background: rgba(207, 174, 134, .28);
  border-left: 1px solid rgba(160, 124, 91, .1);
  border-right: 1px solid rgba(160, 124, 91, .1);
}
.countdown-card::before { top: -8px; left: 35px; transform: rotate(-7deg); }
.countdown-card::after { top: -8px; right: 35px; transform: rotate(8deg); }
.butterfly { font-size: 35px; line-height: 1; margin-bottom: 22px; filter: drop-shadow(0 5px 7px rgba(140, 84, 91, .13)); }
.eyebrow, .countdown-label {
  font: 10px/1.6 Arial, Helvetica, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rose-dark);
}
.eyebrow { margin: 0 0 16px; }
h1 {
  margin: 0 auto;
  font-size: clamp(39px, 7vw, 62px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.08;
}
h1 em { color: var(--rose); font-weight: 400; }
.intro {
  max-width: 410px;
  margin: 20px auto 30px;
  color: #786663;
  font-size: 16px;
  line-height: 1.8;
}
.countdown-wrap {
  padding: 22px 0 19px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.countdown-label { margin: 0 0 20px; color: var(--muted); font-size: 9px; }
.timer { display: flex; justify-content: center; align-items: flex-start; gap: clamp(7px, 2.5vw, 19px); font-variant-numeric: tabular-nums; }
.time-unit { display: flex; min-width: 50px; flex-direction: column; gap: 8px; }
.time-number { color: var(--ink); font-size: clamp(28px, 5.6vw, 44px); line-height: 1; letter-spacing: -.04em; }
.time-name { color: var(--muted); font: 9px/1.3 Arial, Helvetica, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.time-separator { color: #c5a39c; font-size: 27px; line-height: 1; }
.date-note { margin: 21px 0 0; color: var(--muted); font: 10px/1.5 Arial, Helvetica, sans-serif; letter-spacing: .13em; }
.date-note span { color: var(--rose); margin-left: 4px; }
.handwritten-note { margin-top: 27px; color: var(--green); font-size: 18px; font-style: italic; transform: rotate(-3deg); }
.handwritten-note span { color: var(--rose); margin-left: 4px; }
.sticker { position: absolute; display: grid; place-items: center; color: var(--rose); }
.sticker-one { top: 42%; right: -22px; width: 72px; height: 72px; border: 1px solid rgba(184,93,112,.35); border-radius: 50%; background: #f4e5dd; color: var(--rose-dark); font-size: 12px; font-style: italic; line-height: 1.1; transform: rotate(12deg); box-shadow: 0 5px 15px rgba(90,50,45,.08); }
.sticker-two { bottom: 15%; left: -24px; font-size: 48px; color: #8e9a7c; transform: rotate(-17deg); }
.ready-state { padding: 28px 0 5px; animation: reveal-in .65s ease both; }
.ready-sparkle { display: inline-block; color: var(--rose); font-size: 36px; animation: sparkle 2s ease-in-out infinite; }
.ready-title { margin: 5px 0 9px; color: var(--rose-dark); font-size: 29px; font-style: italic; }
.ready-copy { margin: 0 auto 22px; color: #786663; font-size: 15px; line-height: 1.7; }
.gift-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 22px;
  border: 1px solid var(--rose-dark);
  border-radius: 3px;
  color: #fffaf6;
  background: var(--rose-dark);
  text-decoration: none;
  font: 11px/1.5 Arial, Helvetica, sans-serif;
  letter-spacing: .045em;
  box-shadow: 0 8px 18px rgba(145,72,90,.16);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.gift-button:hover, .gift-button:focus-visible { background: #793b4a; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(145,72,90,.23); }
.gift-button:focus-visible { outline: 3px solid #d6a8b1; outline-offset: 4px; }
.footer-line { gap: 14px; margin-top: 27px; font-size: 9px; letter-spacing: .15em; }
.footer-heart { color: var(--rose); font-size: 15px; }
@keyframes card-arrive { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sparkle { 0%, 100% { transform: scale(.92) rotate(-5deg); } 50% { transform: scale(1.08) rotate(6deg); } }
@media (max-width: 520px) {
  .page-shell { padding: 30px 18px 20px; }
  .topline { margin-bottom: 21px; font-size: 8px; letter-spacing: .16em; gap: 8px; }
  .countdown-card { padding: 40px 22px 30px; }
  .countdown-card::before { left: 18px; }
  .countdown-card::after { right: 18px; }
  .intro { font-size: 14px; }
  .time-unit { min-width: 42px; }
  .time-name { font-size: 8px; letter-spacing: .08em; }
  .sticker-one { right: -11px; top: 39%; width: 58px; height: 58px; font-size: 10px; }
  .sticker-two { left: -10px; bottom: 16%; font-size: 34px; }
  .footer-line { font-size: 7px; letter-spacing: .1em; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* Full-screen same-origin gift shell keeps countdown-page audio alive. */
.farah-gift-frame {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border: 0;
  z-index: 2147483647;
  background: #f8f1e8;
}
html.farah-gift-open,
html.farah-gift-open body {
  overflow: hidden;
}
