/* eshra · brand tokens (from Brand Guidelines v1.0) */
:root {
  --rose: #D9778A;      /* logo, shapes — never body text */
  --cream: #FBF1EC;     /* main background */
  --cocoa: #4A2C2A;     /* body text, dark backgrounds */
  --deep: #B8566B;      /* large headlines, hover */
  --blush: #F3CBD1;     /* soft cards, highlights */
  --saffron: #E9A93B;   /* tiny accents only */
  --paper: #FFFAF7;
  --line: #EBD9D2;
  --r: 22px;
  --shadow: 0 1px 2px rgba(74,44,42,.08), 0 10px 30px -12px rgba(74,44,42,.28);
  --sans: "Poppins", system-ui, sans-serif;
  --hand: "Caveat", "Poppins", cursive;
  --ar: "Cairo", "Poppins", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--cocoa);
  font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden; overflow-x: clip;
}
html { overflow-x: hidden; overflow-x: clip; } /* no sideways scrolling, even on iOS */
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px dashed var(--deep); outline-offset: 4px; }
[lang="ar"], .ar { font-family: var(--ar); }

.hand { font-family: var(--hand); font-weight: 500; }
.eyebrow { margin: 0 auto 6px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--deep); font-weight: 500; }
.h2 { margin: 0 auto 40px; font-weight: 500; font-size: clamp(30px, 5vw, 48px); line-height: 1.1; letter-spacing: -.01em; }

section, .foot { padding: 96px 20px; position: relative; text-align: center; }
section > * { max-width: 1080px; margin-left: auto; margin-right: auto; }

/* ---------- paper & torn edges ---------- */
.paper {
  background-image:
    radial-gradient(rgba(184,86,107,.16) 1px, transparent 1.2px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .29 0 0 0 0 .17 0 0 0 0 .16 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 22px 22px, 160px 160px;
}
.torn--blush { background-color: var(--blush); }
.torn--cream { background-color: var(--cream); }
.torn--cocoa { background-color: var(--cocoa); color: var(--cream); }
.torn--rose  { background-color: var(--rose); color: var(--cream); }
.torn::before {
  content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 18px;
  background: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 18' preserveAspectRatio='none'%3E%3Cpath d='M0 18V9l6-3 7 4 8-6 6 5 9-7 7 6 6-3 8 5 7-6 9 4 5-3 8 6 7-5 9 3 6-4 7 5 8-6 6 4 7-3 4 2v13z'/%3E%3C/svg%3E") repeat-x 0 0 / 280px 18px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 18' preserveAspectRatio='none'%3E%3Cpath d='M0 18V9l6-3 7 4 8-6 6 5 9-7 7 6 6-3 8 5 7-6 9 4 5-3 8 6 7-5 9 3 6-4 7 5 8-6 6 4 7-3 4 2v13z'/%3E%3C/svg%3E") repeat-x 0 0 / 280px 18px;
}

/* ---------- tape & polaroids ---------- */
.tape { position: relative; }
.tape::after {
  content: ""; position: absolute; top: -14px; left: 50%; width: 96px; height: 28px;
  transform: translateX(-50%) rotate(-4deg);
  background: repeating-linear-gradient(45deg, rgba(243,203,209,.85) 0 8px, rgba(251,241,236,.85) 8px 16px);
  box-shadow: 0 1px 2px rgba(74,44,42,.12);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
  z-index: 3;
}
.tape--r::after { transform: translateX(-50%) rotate(5deg); background: repeating-linear-gradient(-45deg, rgba(233,169,59,.55) 0 6px, rgba(251,241,236,.8) 6px 12px); }

.pol { margin: 0; background: var(--paper); padding: 12px 12px 0; box-shadow: var(--shadow); border-radius: 4px; }
.pol figcaption { font-size: 24px; padding: 6px 4px 10px; text-align: center; line-height: 1.2; }
.ph {
  aspect-ratio: 4/5; border-radius: 2px; background: var(--blush) center/cover no-repeat;
  position: relative; overflow: hidden;
}
.ph:not([style*="url"])::after { /* brand placeholder: blush block with rose dot */
  content: ""; position: absolute; inset: 0; margin: auto; width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--rose);
}

/* ---------- gift intro ---------- */
.gift {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: var(--cream); transition: opacity .9s ease, visibility .9s, transform .9s ease;
}
.gift::before, .gift::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.gift::before { width: 70vmax; aspect-ratio: 1; right: -30vmax; top: -34vmax; background: var(--blush); }
.gift::after  { width: 46vmax; aspect-ratio: 1; right: -18vmax; top: -22vmax; background: var(--rose); }
.gift.is-open { opacity: 0; visibility: hidden; transform: scale(1.06); }
.gift__inner { position: relative; z-index: 1; text-align: center; max-width: 420px; }
.gift__logo { width: min(260px, 64vw); margin: 0 auto 36px; animation: float 5s ease-in-out infinite; }
.gift__kicker { margin: 0; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--deep); }
.gift__title { margin: 4px 0 32px; font-weight: 500; font-size: clamp(34px, 8vw, 52px); }
.gift__btn {
  display: inline-flex; align-items: center; gap: 12px; border: 0; border-radius: 999px;
  padding: 16px 30px; background: var(--deep); color: var(--cream); font-weight: 500; font-size: 17px;
  box-shadow: 0 12px 30px -10px rgba(184,86,107,.7); transition: transform .2s, background .2s;
}
.gift__btn svg { width: 20px; fill: currentColor; animation: beat 1.4s ease-in-out infinite; }
.gift__btn:hover { transform: translateY(-2px); background: var(--cocoa); }
.gift__hint { margin-top: 18px; font-size: 13px; opacity: .7; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }

/* ---------- masthead ---------- */
.mast {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: rgba(251,241,236,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.mast__logo { width: 92px; }
.mast__nav { display: flex; gap: 22px; font-size: 14px; }
.mast__nav a { color: var(--cocoa); text-decoration: none; position: relative; }
.mast__nav a:hover { color: var(--deep); }
@media (max-width: 720px) { .mast__nav { display: none; } .mast { justify-content: center; } }

/* ---------- cover ---------- */
.cover { padding-top: 40px; padding-bottom: 120px; overflow: hidden; }
.cover__issue {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 2px solid var(--cocoa); border-bottom: 1px solid var(--cocoa); padding: 8px 0;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
}
.cover__names {
  margin: 36px auto 0; font-weight: 600; letter-spacing: -.03em; line-height: .9;
  font-size: clamp(56px, 13vw, 156px); color: var(--deep);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .18em;
}
.cover__names em { font-family: var(--hand); font-style: normal; font-weight: 700; color: var(--rose); font-size: .8em; }
.cover__sub { font-size: clamp(22px, 3.6vw, 30px); margin: 12px auto 0; }
.cover__collage { position: relative; height: 470px; margin-top: 40px; }
.cover__collage .pol { position: absolute; width: 230px; transition: transform .4s ease; }
.cover__collage .pol:hover { transform: rotate(0) scale(1.04) !important; z-index: 5; }
.pol--a { left: calc(50% - 360px); top: 40px; transform: rotate(-8deg); }
.pol--b { left: calc(50% - 115px); top: 0; transform: rotate(3deg); z-index: 2; }
.pol--c { left: calc(50% + 130px); top: 60px; transform: rotate(9deg); }
.sticker { position: absolute; display: grid; place-items: center; border-radius: 50%; text-align: center; z-index: 4; }
.sticker--days {
  width: 140px; height: 140px; left: calc(50% + 245px); top: 295px; background: var(--saffron); color: var(--cocoa);
  transform: rotate(12deg); box-shadow: var(--shadow); line-height: 1; padding: 0 26px; gap: 4px; align-content: center;
  clip-path: polygon(50% 0,61% 9%,75% 5%,79% 19%,93% 22%,90% 37%,100% 50%,90% 63%,93% 78%,79% 81%,75% 95%,61% 91%,50% 100%,39% 91%,25% 95%,21% 81%,7% 78%,10% 63%,0 50%,10% 37%,7% 22%,21% 19%,25% 5%,39% 9%);
}
.sticker--days b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.sticker--days small { font-size: 10px; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.sticker--star { width: 58px; height: 58px; left: calc(50% - 330px); top: 360px; background: var(--rose); color: var(--cream); font-size: 26px; transform: rotate(-12deg); }
@media (max-width: 760px) {
  .cover__collage { height: 480px; }
  .cover__collage .pol { width: 170px; }
  .pol--a { left: calc(50% - 170px); top: 30px; }
  .pol--b { left: calc(50% - 40px); top: 0; }
  .pol--c { left: calc(50% - 100px); top: 240px; }
  .sticker--days { left: calc(50% + 52px); top: 318px; width: 118px; height: 118px; padding: 0 22px; }
  .sticker--days b { font-size: 23px; }
  .sticker--days small { font-size: 9px; }
  .sticker--star { left: calc(50% - 165px); top: 400px; }
}

/* ---------- counter ---------- */
.counter__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 760px; }
.tick { background: var(--cream); border-radius: var(--r); padding: 26px 8px 18px; box-shadow: var(--shadow); }
.tick b { display: block; font-size: clamp(30px, 6vw, 56px); font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; color: var(--cocoa); }
.tick span { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--deep); }
.tick:first-child { background: var(--deep); }
.tick:first-child b, .tick:first-child span { color: var(--cream); }
.counter__note { font-size: 26px; margin-top: 26px; }
@media (max-width: 560px) { .counter__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- album / slideshow ---------- */
.album__stage { position: relative; height: 520px; max-width: 420px; outline: none; touch-action: pan-y; }
.slide {
  position: absolute; inset: 0; margin: auto; width: 340px; height: max-content;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .5s; opacity: 0; pointer-events: none;
}
.slide .ph { aspect-ratio: 4/5; }
.slide.is-active { opacity: 1; pointer-events: auto; transform: rotate(-2deg); z-index: 3; }
.slide.is-prev { opacity: .9; transform: translateX(-46%) rotate(-11deg) scale(.86); z-index: 1; filter: saturate(.7); }
.slide.is-next { opacity: .9; transform: translateX(46%) rotate(9deg) scale(.86); z-index: 2; filter: saturate(.7); }
.slide figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-align: left; }
.slide figcaption small { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--deep); white-space: nowrap; }
.album__ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.round {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--cocoa); background: transparent; font-size: 24px; line-height: 1;
  transition: background .2s, color .2s;
}
.round:hover { background: var(--cocoa); color: var(--cream); }
.album__dots { display: flex; gap: 8px; }
.album__dots button { width: 9px; height: 9px; padding: 0; border-radius: 99px; border: 0; background: var(--blush); transition: width .3s, background .3s; }
.album__dots button.on { width: 26px; background: var(--deep); }
@media (max-width: 520px) { .album__stage { height: 440px; } .slide { width: 260px; } }

/* ---------- letter / envelope ---------- */
.env { position: relative; width: min(520px, 100%); aspect-ratio: 1.6; margin-top: clamp(140px, 38vw, 240px); perspective: 1400px; }
.env__back, .env__front, .env__flap { position: absolute; left: 0; right: 0; top: 0; border-radius: 10px; }
.env__back, .env__front { bottom: 0; }
.env__back { background: var(--deep); box-shadow: 0 24px 40px -22px rgba(74,44,42,.55); }
.env__back::after { /* patterned liner, seen once the flap is open */
  content: ""; position: absolute; inset: 7px 7px 40% 7px; border-radius: 6px;
  background: repeating-linear-gradient(45deg, rgba(251,241,236,.16) 0 7px, transparent 7px 14px);
}
.env__front { z-index: 3; background: var(--rose); clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); }
.env__front::after { /* the bottom fold, a shade lighter */
  content: ""; position: absolute; inset: 0; background: #E08A9B;
  clip-path: polygon(0 100%, 50% 46%, 100% 100%);
}
.env__flap {
  z-index: 4; height: 58%; background: #CB6A7E; clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0; backface-visibility: visible;
  transition: transform .5s cubic-bezier(.4,0,.2,1), z-index 0s .25s; /* closing: drops back over the letter half way */
}
.env.is-open .env__flap { transform: rotateX(180deg); z-index: 1; transition: transform .55s cubic-bezier(.4,0,.2,1) .1s, z-index 0s .38s; }
.env__seal {
  position: absolute; z-index: 5; left: 50%; top: 58%; width: 76px; height: 76px; padding: 14px; border: 0;
  border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 35% 30%, #D9778A, var(--deep) 55%, #8E3A4C);
  box-shadow: 0 6px 14px -4px rgba(74,44,42,.55), inset 0 0 0 5px rgba(0,0,0,.07);
  transform: translate(-50%, -50%); transition: transform .3s, opacity .25s; transition-delay: .5s; /* comes back after the flap closes */
}
.env__seal img { width: 100%; }
.env__seal:hover { transform: translate(-50%, -50%) scale(1.07) rotate(-6deg); transition-delay: 0s; }
.env.is-open .env__seal { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.6); transition-delay: 0s; }
/* the letter inside the envelope: a tall slot clipped at the envelope's bottom edge */
.env__slot { position: absolute; left: 0; right: 0; bottom: 0; height: 500%; z-index: 2; overflow: hidden; pointer-events: none; }
.env__paper {
  position: absolute; left: 5%; width: 90%; margin: 0;
  background: var(--paper) repeating-linear-gradient(transparent 0 31px, rgba(217,119,138,.22) 31px 32px);
  background-position: 0 14px; border-radius: 4px; padding: 30px 30px 26px; text-align: left;
  box-shadow: 0 1px 2px rgba(74,44,42,.1), 0 18px 34px -18px rgba(74,44,42,.45);
}
.env__paper--inside {
  top: 81%; /* = 5% down from the envelope's top edge (the slot is 5× the envelope's height) */
  transform: translateY(0); transition: transform .6s cubic-bezier(.45,0,.25,1);
}
.env.is-rising .env__paper--inside { transform: translateY(var(--rise)); transition: transform .7s cubic-bezier(.3,.7,.25,1), visibility 0s .58s; } /* when closing, reappear only once the card is back on top of it */
.env.is-settled .env__paper--inside { visibility: hidden; transition: transform .7s, visibility 0s; } /* fully covered by the card by now */
/* the letter once it's out. It fades in exactly on top of the risen letter (identical top half, so
   only the part hidden in the pocket appears), then moves down in front of the envelope. */
.env__card {
  top: 5%; z-index: 7; cursor: pointer;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(var(--rise));
  transition: opacity .3s ease, transform .55s cubic-bezier(.45,0,.25,1), visibility 0s .3s;
}
.env.is-out .env__card { opacity: 1; visibility: visible; transition: opacity .3s ease, transform .55s cubic-bezier(.45,0,.25,1), visibility 0s; }
.env.is-settled .env__card { pointer-events: auto; transform: translateY(var(--rest)) rotate(-1.2deg); transition: opacity .3s ease, transform .65s cubic-bezier(.3,.7,.25,1), visibility 0s; }
#env { transition: margin-bottom .6s ease-in-out .15s; }
#env.is-settled { margin-bottom: var(--extra); transition: margin-bottom .65s ease-in-out; }
.env__greet { font-size: 30px; margin: 0 0 6px; color: var(--deep); }
.env__body p { margin: 0 0 12px; font-size: 15px; line-height: 2.13; }
.env__sign { font-size: 26px; margin: 8px 0 0; text-align: right; line-height: 1.2; }
.env__hint { font-size: 22px; margin-top: 22px; transition: opacity .3s; }
@media (max-width: 560px) {
  .env__paper { padding: 22px 20px 20px; }
  .env__body p { font-size: 14.5px; }
  .env__seal { width: 62px; height: 62px; padding: 11px; }
}

/* ---------- voice note ---------- */
.vn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  max-width: 560px; background: var(--paper); border-radius: 40px; padding: 18px 26px 18px 18px; box-shadow: var(--shadow);
}
.vn__play { width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--deep); display: grid; place-items: center; transition: transform .2s; }
.vn__play:hover { transform: scale(1.06); }
.vn__play svg { width: 26px; fill: var(--cream); }
.vn .i-pause, .vn.is-playing .i-play { display: none; }
.vn.is-playing .i-pause { display: block; }
.vn__wave { display: flex; align-items: center; gap: 3px; height: 46px; cursor: pointer; }
.vn__wave i { flex: 1; border-radius: 9px; background: var(--blush); min-height: 4px; transition: background .2s; }
.vn__wave i.on { background: var(--rose); }
.vn__time { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 36px; }
.vn__label { grid-column: 1 / -1; margin: 0; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.vn__label .hand { font-size: 22px; color: var(--deep); line-height: 1; }

/* ---------- place ---------- */
.place__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; text-align: left; }
.place__map { background: var(--paper); padding: 12px; border-radius: 8px; box-shadow: var(--shadow); transform: rotate(-1.5deg); }
.place__map iframe { width: 100%; aspect-ratio: 4/3; border: 0; border-radius: 4px; display: block; filter: saturate(.75) sepia(.12); }
.ticket {
  position: relative; background: var(--cream); border-radius: var(--r); padding: 30px 28px; box-shadow: var(--shadow);
  -webkit-mask: radial-gradient(circle 14px at 0 50%, transparent 98%, #000) , radial-gradient(circle 14px at 100% 50%, transparent 98%, #000);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.ticket__kicker { margin: 0; font-size: 11px; letter-spacing: .26em; color: var(--deep); border-bottom: 1px dashed var(--rose); padding-bottom: 12px; }
.ticket__place { font-size: 28px; font-weight: 500; margin: 14px 0 0; line-height: 1.15; }
.ticket__spot { margin: 4px 0 16px; font-size: 14px; }
.ticket__meta { display: flex; gap: 28px; margin: 0 0 16px; }
.ticket__meta dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--deep); }
.ticket__meta dd { margin: 0; font-weight: 500; }
.ticket__story { font-size: 23px; line-height: 1.3; margin: 0 0 16px; }
.ticket__link { color: var(--deep); font-weight: 500; font-size: 14px; }
@media (max-width: 820px) { .place__grid { grid-template-columns: 1fr; } }

/* ---------- timeline ---------- */
.tl { list-style: none; padding: 0; max-width: 760px; position: relative; text-align: left; }
.tl::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dashed var(--rose); }
.tl li { position: relative; width: 50%; padding: 0 36px 34px 0; }
.tl li:nth-child(even) { margin-left: 50%; padding: 0 0 34px 36px; }
.tl li::before { content: ""; position: absolute; top: 18px; right: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--deep); box-shadow: 0 0 0 5px var(--cream); }
.tl li:nth-child(even)::before { right: auto; left: -7px; }
.tl .card { background: var(--paper); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.tl time { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--cocoa); background: var(--blush); border-radius: 99px; padding: 2px 10px; }
.tl h3 { margin: 8px 0 2px; font-size: 18px; font-weight: 500; }
.tl p { margin: 0; font-size: 14px; }
@media (max-width: 640px) {
  .tl::before { left: 8px; }
  .tl li, .tl li:nth-child(even) { width: auto; margin-left: 0; padding: 0 0 26px 34px; }
  .tl li::before, .tl li:nth-child(even)::before { left: 1px; right: auto; }
}

/* ---------- 10 things ---------- */
.loves .h2 { color: var(--cream); }
.loves .eyebrow { color: var(--blush); }
.loves__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; perspective: 1200px; }
.flip { aspect-ratio: 3/4; border: 0; padding: 0; background: none; position: relative; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.flip:nth-child(odd) { rotate: -1.5deg; } .flip:nth-child(even) { rotate: 1.5deg; }
.flip.is-flipped { transform: rotateY(180deg); }
.flip__f, .flip__b { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; display: grid; place-items: center; padding: 14px; }
.flip__f { background: var(--rose); color: var(--cream); }
.flip__f b { font-size: 46px; font-weight: 500; line-height: 1; }
.flip__f small { position: absolute; bottom: 14px; left: 0; right: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.flip__f::before { content: "♡"; position: absolute; top: 10px; right: 14px; font-size: 18px; }
.flip:nth-child(3n+2) .flip__f { background: var(--blush); color: var(--cocoa); }
.flip:nth-child(3n) .flip__f { background: var(--deep); }
.flip__b { background: var(--paper); color: var(--cocoa); transform: rotateY(180deg); font-family: var(--hand); font-size: 23px; line-height: 1.15; }
.flip__b::after { content: attr(data-n); position: absolute; top: 10px; left: 14px; font: 500 11px var(--sans); letter-spacing: .15em; color: var(--deep); }
.loves__count { font-size: 24px; margin-top: 26px; color: var(--blush); }
@media (max-width: 900px) { .loves__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .loves__grid { grid-template-columns: repeat(2, 1fr); } .flip__b { font-size: 20px; } }

/* ---------- quiz ---------- */
.qz { max-width: 620px; background: var(--cream); border-radius: var(--r); padding: 32px 28px; box-shadow: var(--shadow); text-align: left; }
.qz__top { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--deep); }
.qz__bar { height: 6px; background: var(--blush); border-radius: 9px; margin: 10px 0 24px; overflow: hidden; }
.qz__bar i { display: block; height: 100%; background: var(--deep); border-radius: 9px; transition: width .4s; }
.qz__q { font-size: 22px; font-weight: 500; margin: 0 0 18px; line-height: 1.3; }
.qz__opts { display: grid; gap: 10px; }
.qz__opt {
  text-align: left; padding: 14px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper);
  transition: border-color .2s, background .2s, transform .2s;
}
.qz__opt:hover:not(:disabled) { border-color: var(--rose); transform: translateX(4px); }
.qz__opt.ok { background: #E4F1E4; border-color: #6FA56F; }
.qz__opt.no { background: var(--blush); border-color: var(--deep); }
.qz__opt:disabled { cursor: default; }
.qz__fb { font-family: var(--hand); font-size: 24px; min-height: 34px; margin: 14px 0 0; color: var(--deep); }
.qz__next { margin-top: 8px; }
.btn { border: 0; border-radius: 999px; padding: 12px 26px; background: var(--deep); color: var(--cream); font-weight: 500; transition: background .2s; }
.btn:hover { background: var(--cocoa); }
.qz__done { text-align: center; }
.qz__score { font-size: 72px; font-weight: 600; color: var(--deep); line-height: 1; margin: 10px 0; }

/* ---------- open when ---------- */
.ow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; max-width: 980px; }
.owc {
  position: relative; aspect-ratio: 1.45; border: 0; border-radius: 10px; background: var(--blush); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .3s; padding: 0;
}
.owc:nth-child(odd) { rotate: -1.5deg; } .owc:nth-child(even) { rotate: 2deg; }
.owc:hover { transform: translateY(-6px); }
.owc::before { content: ""; position: absolute; inset: 0; background: var(--rose); clip-path: polygon(0 0, 100% 0, 50% 55%); }
.owc span { position: absolute; left: 0; right: 0; bottom: 18px; font-size: 14px; }
.owc span b { display: block; font-family: var(--hand); font-size: 26px; font-weight: 700; color: var(--deep); line-height: 1; }
.owc i { position: absolute; left: 50%; top: 55%; transform: translate(-50%,-50%); width: 34px; height: 34px; border-radius: 50%; background: var(--saffron); font-style: normal; display: grid; place-items: center; color: var(--cocoa); font-size: 14px; }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(74,44,42,.55); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal__card { position: relative; background: var(--paper); border-radius: var(--r); max-width: 460px; width: 100%; padding: 34px 30px; text-align: center; animation: pop .4s cubic-bezier(.2,.8,.2,1); }
.modal__text { font-size: 28px; line-height: 1.3; margin: 8px 0 0; }
.modal__x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 28px; line-height: 1; }
@keyframes pop { from { transform: scale(.85) rotate(-3deg); opacity: 0; } }

/* ---------- footer ---------- */
.foot { padding-top: 90px; padding-bottom: 60px; }
.foot__logo { width: 220px; margin: 0 auto 22px; }
.foot__line { font-size: 22px; margin: 0; }
.foot__small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }

/* ---------- song pill ---------- */
.song {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 999px; padding: 8px 18px 8px 8px; background: var(--cocoa); color: var(--cream);
  box-shadow: 0 10px 30px -8px rgba(74,44,42,.6); max-width: calc(100vw - 36px);
}
.song[hidden] { display: none; }
.song__disc { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: repeating-radial-gradient(#2c1a19 0 2px, #3a2422 2px 4px); animation: spin 4s linear infinite; animation-play-state: paused; }
.song__disc span { width: 14px; height: 14px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px var(--blush); }
.song__meta { display: grid; text-align: left; line-height: 1.2; min-width: 0; }
.song__meta b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song__meta small { font-size: 11px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song__bars { display: flex; gap: 2px; align-items: flex-end; height: 16px; }
.song__bars i { width: 3px; height: 30%; background: var(--rose); border-radius: 2px; }
.song.is-playing .song__disc { animation-play-state: running; }
.song.is-playing .song__bars i { animation: eq 1s ease-in-out infinite; }
.song__bars i:nth-child(2) { animation-delay: -.3s !important; } .song__bars i:nth-child(3) { animation-delay: -.6s !important; } .song__bars i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes eq { 50% { height: 100%; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

.heart-burst { position: fixed; pointer-events: none; z-index: 120; font-size: 20px; color: var(--rose); animation: burst 1.4s ease-out forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
.album { overflow: hidden; }

/* phones: the song control shrinks to just the spinning record */
@media (max-width: 560px) {
  .song { right: 14px; bottom: 14px; padding: 6px; gap: 0; }
  .song__meta, .song__bars { display: none; }
  .song__disc { width: 46px; height: 46px; }
}
.cover__sub, .h2 { text-wrap: balance; }

/* ---------- couple pages: empty sections stay out of the way ---------- */
[hidden] { display: none !important; }
.place__grid--solo { grid-template-columns: minmax(0, 520px); justify-content: center; }
.tl .card__ph { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.missing { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px; gap: 6px; }
.missing img { width: 180px; margin-bottom: 18px; }
.missing h1 { margin: 0; font-weight: 500; font-size: clamp(24px, 5vw, 34px); }
.missing p { margin: 0; opacity: .8; }
