:root{
  --bg:#090909;--bg-2:#111;--card:#151515;--text:#f4f1ea;--muted:#9c9c9c;
  --line:rgba(255,255,255,.14);--accent:#d7ff3f;--accent-soft:rgba(215,255,63,.16);
  --body-copy:#d2d2d2;--grid-line:rgba(255,255,255,.035);--switch-bg:rgba(12,12,12,.78);
  --accent-ink:#060606;--photo-shadow:rgba(0,0,0,.55);--radius:28px;
}
[hidden]{display:none!important}.nf-empty{border:1px dashed var(--line);padding:30px;color:var(--muted);text-align:center}
.gifts-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:32px;align-items:center;padding:clamp(28px,5vw,64px);background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}
.gifts-card h2{font-family:"Space Grotesk";font-size:clamp(40px,7vw,92px);line-height:.9;letter-spacing:-.055em;margin:0 0 20px}.gifts-card p{max-width:680px;color:var(--body-copy);line-height:1.8}.wishlist-link{width:116px;height:116px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:var(--accent-ink);font-weight:800;text-align:center}
.nf-rsvp-shell{padding:clamp(24px,4vw,52px);background:var(--card);border:1px solid var(--line);border-radius:var(--radius);min-width:0}.nf-rsvp-shell *{max-width:100%}
.nf-rsvp-shell input,.nf-rsvp-shell select,.nf-rsvp-shell textarea{background:transparent!important;color:var(--text)!important;border-color:var(--line)!important}.nf-rsvp-shell button{background:var(--accent)!important;color:var(--accent-ink)!important}
.nf-music{margin-top:18px}.nf-music>*{max-width:100%}
@media(max-width:700px){.gifts-card{grid-template-columns:1fr}.wishlist-link{width:92px;height:92px}}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;overflow-x:hidden}
a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.section-pad{padding:110px clamp(22px,5vw,76px)}.section-line{border-top:1px solid var(--line);position:relative}.section-index{position:absolute;top:24px;right:clamp(22px,5vw,76px);font-family:"Space Grotesk";font-size:12px;color:var(--muted);letter-spacing:.18em}.eyebrow{margin:0 0 20px;text-transform:uppercase;letter-spacing:.22em;font-size:12px;color:var(--accent);font-weight:700}.ambient{position:fixed;inset:0;pointer-events:none;z-index:-1;overflow:hidden}.orb{position:absolute;border-radius:50%;filter:blur(100px);opacity:.18}.orb-a{width:380px;height:380px;background:var(--accent);top:-120px;right:-140px}.orb-b{width:260px;height:260px;background:var(--accent);bottom:10%;left:-130px;opacity:.09}.grid{position:absolute;inset:0;background-image:linear-gradient(var(--grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--grid-line) 1px,transparent 1px);background-size:52px 52px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.8),transparent 80%)}
.hero{min-height:100svh;display:flex;flex-direction:column;justify-content:space-between;padding-top:54px;position:relative}.hero-meta{display:flex;justify-content:space-between;gap:20px;font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--muted)}.hero-stage{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:2vw;margin:28px 0 34px}.hero-copy h1{margin:0;font-family:"Space Grotesk";font-size:clamp(64px,10vw,160px);line-height:.78;letter-spacing:-.07em}.hero-copy h1 span{display:block}.birthday-heading{position:relative;display:inline-block}.age-sticker{position:absolute;right:-74px;top:-28px;width:112px;height:112px;border-radius:50%;display:grid;place-content:center;text-align:center;background:var(--accent);color:#070707;transform:rotate(9deg);box-shadow:0 18px 50px var(--accent-soft);animation:ageFloat 4s ease-in-out infinite}.age-sticker strong{font-family:"Space Grotesk";font-size:58px;line-height:.78;letter-spacing:-.08em}.age-sticker span{margin-top:8px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.2em}@keyframes ageFloat{0%,100%{transform:rotate(9deg) translateY(0)}50%{transform:rotate(5deg) translateY(-8px)}}.hero-copy h1 .outline{-webkit-text-stroke:1px var(--text);color:transparent}.hero-note{max-width:360px;color:var(--muted);font-size:15px;margin-top:30px;line-height:1.7}.portrait-wrap{position:relative;max-width:690px;justify-self:start;width:100%;aspect-ratio:4/5}.portrait-frame{position:absolute;inset:5.5%;overflow:hidden;border-radius:50% 50% 8px 8px;background:var(--card);box-shadow:0 30px 80px var(--photo-shadow)}.portrait-frame img{width:100%;height:100%;object-fit:cover;transform:scale(1.035);filter:grayscale(1) contrast(1.08)}.portrait-shade{position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.7),transparent 55%)}.portrait-label{color:#fff;position:absolute;left:24px;right:24px;bottom:22px;display:flex;justify-content:space-between;align-items:end;text-transform:uppercase}.portrait-label span{font-size:9px;letter-spacing:.2em}.portrait-label strong{font-family:"Space Grotesk";font-size:26px}.portrait-ring{position:absolute;border:1px solid var(--line);border-radius:50%;animation:spin 14s linear infinite}.ring-1{inset:0}.ring-2{inset:4%;border-style:dashed;animation-direction:reverse;animation-duration:20s}.vinyl-dot{position:absolute;width:14px;height:14px;border-radius:50%;background:var(--accent);right:6%;top:20%;box-shadow:0 0 30px var(--accent)}@keyframes spin{to{transform:rotate(360deg)}}.hero-bottom{display:flex;justify-content:space-between;align-items:center}.scroll-mark{font-size:10px;color:var(--muted);letter-spacing:.22em}.primary-btn{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 28px;border:1px solid var(--accent);background:var(--accent);color:var(--accent-ink);border-radius:999px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;font-size:12px;transition:.25s;cursor:pointer}.primary-btn:hover{transform:translateY(-3px);box-shadow:0 14px 35px var(--accent-soft)}.equalizer{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:flex;gap:8px;align-items:end;height:60px;opacity:.22}.equalizer span{width:1px;background:var(--accent);animation:bars 1.8s ease-in-out infinite}.equalizer span:nth-child(odd){animation-delay:.25s}.equalizer span:nth-child(3n){animation-delay:.5s}@keyframes bars{0%,100%{height:10px}50%{height:56px}}
.about-grid,.dress-grid,.rsvp-grid{display:grid;grid-template-columns:1fr 1fr;gap:8vw;align-items:start}.section-title h2,.section-head h2{margin:0;font-family:"Space Grotesk";font-size:clamp(42px,7vw,96px);line-height:.95;letter-spacing:-.05em}.section-title h2 span{color:var(--accent)}.about-copy{max-width:620px}.about-copy>p,.dress-copy>p{font-size:clamp(18px,2vw,28px);line-height:1.5;color:var(--body-copy)}.about-copy>p+p{color:var(--muted);font-size:16px}.micro-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line);margin-top:46px;border:1px solid var(--line)}.micro-stats div{background:var(--bg);padding:24px}.micro-stats strong{display:block;font-family:"Space Grotesk";font-size:34px}.micro-stats span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em}
.countdown{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.countdown div{padding:45px 18px;border-right:1px solid var(--line)}.countdown div:last-child{border-right:0}.countdown strong{display:block;font-family:"Space Grotesk";font-size:clamp(52px,9vw,130px);line-height:.9}.countdown span{display:block;margin-top:16px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.16em}
.section-head{margin-bottom:50px}.timeline{border-top:1px solid var(--line)}.timeline-item{display:grid;grid-template-columns:180px 1fr;padding:34px 0;border-bottom:1px solid var(--line);transition:.3s}.timeline-item:hover{padding-left:18px;background:linear-gradient(90deg,var(--accent-soft),transparent)}.timeline-item time{font-family:"Space Grotesk";font-size:30px;color:var(--accent)}.track-no{font-size:9px;color:var(--muted);letter-spacing:.18em}.timeline-item h3{font-family:"Space Grotesk";font-size:clamp(24px,4vw,54px);margin:8px 0 10px}.timeline-item p{margin:0;color:var(--muted)}
.visual-break{overflow:hidden}.marquee{display:flex;width:max-content;gap:0;transform:rotate(-2deg);margin:0 -10vw 90px;background:var(--accent);color:var(--accent-ink);padding:14px 0;font-family:"Space Grotesk";font-weight:700;letter-spacing:.08em}.marquee div{white-space:nowrap;animation:marquee 22s linear infinite;padding-right:30px}@keyframes marquee{to{transform:translateX(-100%)}}.poster-grid{display:grid;grid-template-columns:1.22fr .62fr .72fr;gap:16px;align-items:stretch;max-width:1120px;margin:0 auto}.poster{position:relative;margin:0;overflow:hidden;min-height:300px;background:var(--card)}.poster img{width:100%;height:100%;object-fit:cover;filter:grayscale(1);transition:.6s}.poster:hover img{transform:scale(1.06);filter:grayscale(.2)}.poster span{position:absolute;left:18px;bottom:16px;font-size:10px;letter-spacing:.17em}.poster-small{min-height:220px;align-self:end}.quote-card{border:1px solid var(--line);padding:30px;display:flex;flex-direction:column;justify-content:space-between}.quote-card span{font-size:100px;line-height:.5;color:var(--accent)}.quote-card p{font-family:"Space Grotesk";font-size:28px;line-height:1.1}
.place-card{display:grid;grid-template-columns:1fr auto auto;gap:30px;align-items:end;padding:45px;border:1px solid var(--line);background:linear-gradient(135deg,var(--accent-soft),transparent 40%)}.place-card h2{font-family:"Space Grotesk";font-size:clamp(50px,8vw,110px);margin:0 0 18px;letter-spacing:-.06em}.place-card p{color:var(--muted);line-height:1.6}.place-code{font-size:11px;color:var(--muted);letter-spacing:.15em}.circle-link{width:104px;height:104px;border-radius:50%;border:1px solid var(--accent);display:grid;place-items:center;font-weight:800;font-size:12px;transition:.3s}.circle-link:hover{background:var(--accent);color:var(--accent-ink);transform:rotate(8deg)}
.palette{display:flex;gap:10px;margin-top:35px}.palette span{width:56px;height:56px;border-radius:50%;background:var(--c);border:1px solid rgba(255,255,255,.18)}.rsvp-form{display:grid;gap:26px}.rsvp-form label{display:grid;gap:10px}.rsvp-form label>span{font-size:10px;text-transform:uppercase;letter-spacing:.18em;color:var(--muted)}.rsvp-form input,.rsvp-form select,.rsvp-form textarea{width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);padding:14px 0;outline:0;border-radius:0}.rsvp-form select option{background:var(--bg)}.rsvp-form input:focus,.rsvp-form select:focus,.rsvp-form textarea:focus{border-color:var(--accent)}.form-success{display:none;color:var(--accent);font-weight:700}.rsvp-form.is-sent .form-success{display:block}.rsvp-form.is-sent .primary-btn{opacity:.5;pointer-events:none}
.footer{border-top:1px solid var(--line);padding-top:90px;padding-bottom:40px}.footer-word{font-family:"Space Grotesk";font-size:clamp(70px,14vw,220px);font-weight:700;line-height:.72;letter-spacing:-.08em;color:transparent;-webkit-text-stroke:1px var(--text)}.footer-meta{display:flex;justify-content:space-between;margin-top:60px;font-size:11px;color:var(--muted);letter-spacing:.16em}.reveal{opacity:0;transform:translateY(30px);transition:opacity .8s ease,transform .8s ease}.reveal.visible{opacity:1;transform:none}
@media(max-width:900px){.hero-copy{order:1}.portrait-wrap{order:2}.age-sticker{right:-18px;top:-50px;width:92px;height:92px}.age-sticker strong{font-size:46px}.section-pad{padding:84px 22px}.hero-stage{grid-template-columns:1fr;gap:40px}.portrait-wrap{justify-self:center;max-width:500px}.hero-copy h1{font-size:clamp(66px,20vw,120px)}.about-grid,.dress-grid,.rsvp-grid{grid-template-columns:1fr;gap:46px}.countdown{grid-template-columns:repeat(2,1fr)}.countdown div:nth-child(2){border-right:0}.countdown div:nth-child(-n+2){border-bottom:1px solid var(--line)}.poster-grid{grid-template-columns:1fr 1fr}.quote-card{grid-column:1/-1;min-height:240px}.place-card{grid-template-columns:1fr}.place-code{display:none}.circle-link{width:86px;height:86px}.timeline-item{grid-template-columns:100px 1fr}.footer-meta{gap:20px;flex-wrap:wrap}}
@media(max-width:560px){.hero{padding-top:34px}.age-sticker{right:0;top:-58px;width:78px;height:78px;transform:rotate(8deg)}.age-sticker strong{font-size:38px}.age-sticker span{font-size:8px;margin-top:5px}.hero-meta{display:grid;grid-template-columns:1fr 1fr}.hero-meta span:last-child{grid-column:1/-1}.hero-stage{margin-top:20px}.hero-copy h1{font-size:21vw}.portrait-wrap{aspect-ratio:4/5}.hero-bottom{gap:18px}.scroll-mark{max-width:160px;line-height:1.5}.primary-btn{padding:0 20px}.timeline-item{grid-template-columns:1fr;gap:12px}.timeline-item time{font-size:24px}.poster-grid{grid-template-columns:1fr}.poster-small,.poster-large{min-height:340px}.quote-card{min-height:220px}.countdown strong{font-size:18vw}.countdown div{padding:32px 12px}.palette span{width:44px;height:44px}.footer-word{font-size:20vw}.theme-switcher{left:10px;right:10px;bottom:10px;justify-content:center;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}.reveal{opacity:1;transform:none}}



/* ===== Mobile polish + random lamp-outline flicker ===== */
.neon-word{
  position:relative;
  display:flex!important;
  width:max-content;
  max-width:100%;
  color:transparent!important;
  -webkit-text-stroke:1px var(--text)!important;
  text-shadow:none!important;
  isolation:isolate;
}
.neon-letter{
  position:relative;
  display:inline-block;
  color:transparent;
  -webkit-text-stroke:1px var(--text);
}
.neon-letter::before{
  content:attr(data-char);
  position:absolute;
  inset:0;
  color:transparent;
  -webkit-text-stroke:1.7px var(--accent);
  opacity:0;
  filter:blur(2.8px);
  text-shadow:
    0 0 4px color-mix(in srgb,var(--accent) 58%,transparent),
    0 0 11px color-mix(in srgb,var(--accent) 34%,transparent),
    0 0 20px color-mix(in srgb,var(--accent) 16%,transparent);
  pointer-events:none;
}
.neon-letter.is-lit::before{opacity:.62}
.neon-letter.is-flicker::before{animation:letterLampFlicker .48s steps(1,end)}
@keyframes letterLampFlicker{
  0%{opacity:0}
  10%{opacity:.76}
  18%{opacity:.12}
  27%{opacity:.7}
  42%{opacity:.2}
  55%{opacity:.82}
  72%{opacity:.36}
  100%{opacity:0}
}

.age-sticker{
  right:-88px;
  top:-42px;
  width:148px;
  height:148px;
  border-radius:34px 50% 44px 50%;
  place-content:center;
  overflow:hidden;
  background:
    linear-gradient(145deg,color-mix(in srgb,var(--accent) 92%,white 8%),var(--accent));
  border:1px solid color-mix(in srgb,var(--accent) 62%,white 38%);
  transform:rotate(8deg);
  box-shadow:
    0 22px 56px color-mix(in srgb,var(--accent) 20%,transparent),
    inset 0 1px 0 rgba(255,255,255,.4);
}
.age-sticker::after{
  content:"";
  position:absolute;
  inset:8px;
  border:1px solid rgba(5,5,5,.24);
  border-radius:28px 50% 38px 50%;
  pointer-events:none;
}
.age-sticker strong{
  position:relative;
  z-index:2;
  font-size:78px;
  line-height:.72;
  letter-spacing:-.11em;
  margin-left:-5px;
}
.age-years{
  position:absolute;
  right:16px;
  top:42px;
  z-index:3;
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  margin:0!important;
  font-size:10px!important;
  letter-spacing:.28em!important;
}
.age-mark{
  position:absolute;
  left:18px;
  bottom:13px;
  z-index:3;
  font-size:7px!important;
  font-weight:900;
  letter-spacing:.22em!important;
  margin:0!important;
}
.age-orbit{
  position:absolute;
  width:88px;
  height:88px;
  left:-30px;
  top:-26px;
  border-radius:50%;
  border:1px solid rgba(5,5,5,.35);
  box-shadow:0 0 0 11px rgba(5,5,5,.05),0 0 0 24px rgba(5,5,5,.035);
}
@keyframes ageFloat{
  0%,100%{transform:rotate(8deg) translateY(0) scale(1)}
  50%{transform:rotate(5deg) translateY(-7px) scale(1.015)}
}

@media(max-width:900px){
  .hero{min-height:auto;padding-top:30px;padding-bottom:72px;overflow:hidden}
  .hero-meta{position:relative;z-index:3}
  .hero-stage{display:flex;flex-direction:column;margin:34px 0 28px;gap:34px}
  .hero-copy{width:100%;order:1;padding-right:0}
  .portrait-wrap{order:2;width:min(100%,560px);max-width:none;aspect-ratio:4/5;margin-inline:auto}
  .birthday-heading{display:block;width:100%;padding-right:0}
  .hero-copy h1{font-size:clamp(58px,15vw,112px);line-height:.82;letter-spacing:-.075em}
  .neon-word{width:100%;white-space:nowrap}
  .age-sticker{right:1vw;top:-50px;width:122px;height:122px}
  .age-sticker strong{font-size:64px}
  .age-years{right:13px;top:34px}
  .age-mark{left:15px;bottom:11px;font-size:6px!important}
  .hero-note{max-width:520px;margin-top:22px}
  .hero-bottom{position:relative;z-index:2}
  .equalizer{height:42px;opacity:.18}
  .section-index{top:22px;right:22px}
  .poster-grid{max-width:760px}
}

@media(max-width:620px){
  body{overflow-x:hidden}
  .section-pad{padding:72px 18px}
  .hero{padding-top:24px;padding-bottom:64px}
  .hero-meta{grid-template-columns:1fr auto;gap:8px 14px;font-size:9px;letter-spacing:.12em}
  .hero-meta span:last-child{grid-column:1/-1}
  .hero-stage{gap:26px;margin-top:26px}
  .eyebrow{font-size:9px;letter-spacing:.16em}
  .hero-copy h1{font-size:clamp(48px,17.6vw,88px);line-height:.83;letter-spacing:-.08em}
  .hero-copy h1 span:first-child{margin-bottom:3px}
  .neon-word{font-size:.88em;white-space:nowrap}
  .neon-letter,.neon-word{-webkit-text-stroke-width:.8px!important}
  .neon-letter::before{-webkit-text-stroke-width:1.35px;filter:blur(2.2px)}
  .age-sticker{width:96px;height:96px;right:0;top:-46px;border-radius:24px 50% 28px 50%}
  .age-sticker::after{inset:6px;border-radius:20px 50% 24px 50%}
  .age-sticker strong{font-size:50px}
  .age-years{right:10px;top:27px;font-size:8px!important}
  .age-mark{left:12px;bottom:9px;font-size:5px!important;letter-spacing:.16em!important}
  .age-orbit{width:60px;height:60px;left:-22px;top:-20px}
  .portrait-wrap{width:calc(100% + 8px);margin-left:-4px;aspect-ratio:4/4.9}
  .portrait-frame{inset:4%;border-radius:50% 50% 6px 6px}
  .portrait-label{left:18px;right:18px;bottom:16px}
  .portrait-label strong{font-size:22px}
  .hero-bottom{align-items:stretch;flex-direction:column;gap:16px}
  .scroll-mark{max-width:none;text-align:center}
  .hero-bottom .primary-btn{width:100%}
  .section-title h2,.section-head h2{font-size:clamp(40px,14vw,68px)}
  .about-copy>p,.dress-copy>p{font-size:17px}
  .micro-stats{grid-template-columns:1fr;margin-top:30px}
  .micro-stats div{padding:18px 20px}
  .countdown div{padding:28px 10px}
  .countdown strong{font-size:17vw}
  .timeline-item{padding:26px 0}
  .timeline-item h3{font-size:clamp(25px,8vw,38px)}
  .marquee{margin-bottom:54px}
  .poster-grid{gap:10px}
  .poster-small,.poster-large{min-height:280px}
  .quote-card{min-height:190px;padding:24px}
  .quote-card p{font-size:24px}
  .place-card{padding:28px 22px;gap:22px}
  .place-card h2{font-size:15vw}
  .circle-link{width:76px;height:76px}
  .palette{gap:7px;flex-wrap:wrap}
  .palette span{width:40px;height:40px}
  .rsvp-form{gap:22px}
  .footer{padding-top:72px;padding-bottom:96px}
  .footer-meta{display:grid;grid-template-columns:1fr 1fr;gap:14px}
  .footer-meta span:last-child{grid-column:1/-1}
  .theme-switcher{padding:7px 9px;gap:7px;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));border-radius:20px}
  .theme-switcher button{width:17px;height:17px;flex:0 0 17px}
}

@media(max-width:390px){
  .section-pad{padding-left:15px;padding-right:15px}
  .hero-copy h1{font-size:17vw}
  .neon-word{font-size:.86em}
  .age-sticker{width:86px;height:86px;top:-40px}
  .age-sticker strong{font-size:44px}
  .age-years{top:24px;right:9px}
  .age-mark{display:none}
  .portrait-wrap{width:100%;margin-left:0}
  .countdown span{font-size:9px;letter-spacing:.1em}
  .theme-switcher{gap:6px}
  .theme-switcher button{width:16px;height:16px;flex-basis:16px}
}

@media(prefers-reduced-motion:reduce){
  .neon-letter::before{display:none!important}
}

/* Light theme refinements */

@media(min-width:901px){
  .portrait-wrap{transform:translateX(-2.2vw)}
}
/* Внешний заголовок RSVP уже есть в левой колонке. */
.nf-rsvp-shell .rsvp-head,
.nf-rsvp-shell .rsvp-header,
.nf-rsvp-shell .rsvp-heading,
.nf-rsvp-shell .rsvp-kicker,
.nf-rsvp-shell .rsvp-intro,
.nf-rsvp-shell .block-head,
.nf-rsvp-shell .section-head {
  display: none !important;
}
.nf-rsvp-shell.is-form-only {
  padding-top: clamp(22px, 3vw, 38px);
}

/* ===== Mobile overflow and scroll performance fixes ===== */
html,
body{
  width:100%;
  max-width:100%;
  overflow-x:clip;
  overscroll-behavior-x:none;
}
body,
main,
section,
header,
footer{
  min-width:0;
  max-width:100%;
}
img,svg,video,canvas,iframe{
  max-width:100%;
}
.hero,
.hero-stage,
.hero-copy,
.birthday-heading,
.visual-break,
.poster-grid,
.rsvp-grid,
.nf-rsvp-shell{
  min-width:0;
  max-width:100%;
}
.visual-break{
  overflow-x:clip;
}
.marquee{
  max-width:none;
  will-change:transform;
  contain:paint;
}
.neon-word{
  max-width:100%;
}
.ambient{
  contain:strict;
  transform:translateZ(0);
}

@media(max-width:900px){
  html{scroll-behavior:auto}
  body{overflow-x:clip}

  /* Fixed blur layers are expensive on mobile, especially while scrolling up. */
  .ambient{
    position:absolute;
    width:100%;
    height:100svh;
    overflow:hidden;
    contain:paint;
  }
  .orb{
    filter:blur(64px);
    will-change:auto;
  }
  .grid{
    mask-image:linear-gradient(to bottom,rgba(0,0,0,.72),transparent 72%);
    -webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.72),transparent 72%);
  }

  .hero-copy,
  .birthday-heading{
    overflow:visible;
  }
  .birthday-heading{
    padding-right:clamp(54px,16vw,104px);
  }
  .neon-word{
    display:block;
    width:100%;
    max-width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .age-sticker{
    right:0!important;
  }

  /* Infinite effects only run while their section is visible. */
  .portrait-ring,
  .equalizer span,
  .age-sticker,
  .marquee div{
    animation-play-state:paused!important;
  }
  .hero.is-in-view .portrait-ring,
  .hero.is-in-view .equalizer span,
  .hero.is-in-view .age-sticker,
  .visual-break.is-in-view .marquee div{
    animation-play-state:running!important;
  }

  .section-pad{
    contain:layout paint style;
  }
}

@media(max-width:620px){
  .birthday-heading{
    padding-right:76px;
  }
  .hero-copy h1{
    width:100%;
    max-width:100%;
  }
  .neon-word{
    font-size:.82em;
    line-height:.9;
    letter-spacing:-.075em;
  }
  .marquee{
    width:max-content;
    max-width:none;
    margin-left:-18px;
    margin-right:-18px;
    transform:rotate(-1.25deg);
  }
  .poster-grid,
  .poster,
  .quote-card{
    width:100%;
    max-width:100%;
  }
}

@media(max-width:390px){
  .birthday-heading{padding-right:68px}
  .neon-word{font-size:.79em}
}

/* ===== Empty-template placeholders ===== */
.nf-photo-placeholder{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:28px;
  text-align:center;
  color:var(--muted);
  background:
    linear-gradient(135deg,transparent 0 49.5%,var(--line) 50% 50.5%,transparent 51%),
    linear-gradient(45deg,transparent 0 49.5%,var(--line) 50% 50.5%,transparent 51%),
    color-mix(in srgb,var(--card) 92%,var(--bg));
  font-size:12px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.nf-photo-placeholder span{
  max-width:220px;
  padding:12px 16px;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb,var(--card) 88%,transparent);
}
.nf-gallery-empty{
  grid-column:1/-1;
  min-height:220px;
  display:grid;
  place-items:center;
  border-radius:var(--radius);
}

/* ===== RSVP options: the selected button itself changes colour ===== */
.nf-rsvp-shell button,
.nf-rsvp-shell [role="button"],
.nf-rsvp-shell label:has(input[type="radio"]),
.nf-rsvp-shell label:has(input[type="checkbox"]){
  box-shadow:none!important;
  transition:background-color .2s ease,color .2s ease,border-color .2s ease,transform .2s ease!important;
}
.nf-rsvp-shell label:has(input[type="radio"]),
.nf-rsvp-shell .rsvp-option,
.nf-rsvp-shell .answer-option,
.nf-rsvp-shell .attendance-option,
.nf-rsvp-shell [data-rsvp-option]{
  background:transparent!important;
  color:var(--text)!important;
  border:1px solid var(--line)!important;
}
.nf-rsvp-shell label:has(input[type="radio"]:checked),
.nf-rsvp-shell label.is-selected,
.nf-rsvp-shell button.is-selected,
.nf-rsvp-shell [role="button"].is-selected,
.nf-rsvp-shell .rsvp-option.is-selected,
.nf-rsvp-shell .answer-option.is-selected,
.nf-rsvp-shell .attendance-option.is-selected,
.nf-rsvp-shell [data-rsvp-option].is-selected,
.nf-rsvp-shell [aria-pressed="true"]{
  background:var(--accent)!important;
  color:var(--accent-ink)!important;
  border-color:var(--accent)!important;
  box-shadow:none!important;
}
.nf-rsvp-shell label:has(input[type="radio"]:checked) *,
.nf-rsvp-shell .is-selected *{
  color:inherit!important;
}
.nf-rsvp-shell input[type="radio"],
.nf-rsvp-shell input[type="checkbox"]{
  accent-color:var(--accent);
}

/* ===== Final gallery sizing + location photo ===== */
.poster-grid{
  max-width:920px;
  grid-template-columns:1.08fr .72fr .72fr;
  gap:14px;
}
.poster{
  min-height:240px;
  border-radius:18px;
}
.poster-small{
  min-height:190px;
}

.place-card{
  grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr);
  align-items:stretch;
  gap:34px;
}
.place-photo{
  min-height:360px;
  border-radius:24px;
  overflow:hidden;
  background:var(--card);
  border:1px solid var(--line);
}
.place-photo img{
  display:block;
  width:100%;
  height:100%;
  min-height:360px;
  object-fit:cover;
  filter:grayscale(.25) contrast(1.03);
  transition:transform .7s ease,filter .7s ease;
}
.place-card:hover .place-photo img{
  transform:scale(1.035);
  filter:grayscale(0) contrast(1.02);
}
.place-content{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}
.place-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:26px;
}
.nf-location-empty{
  min-height:360px;
  height:100%;
  display:grid;
  place-items:center;
  padding:28px;
  text-align:center;
}

@media(max-width:900px){
  .poster-grid{max-width:680px;grid-template-columns:1fr 1fr}
  .poster,.poster-small,.poster-large{min-height:240px}
  .place-card{grid-template-columns:1fr;padding:24px}
  .place-photo,.place-photo img,.nf-location-empty{min-height:300px}
  .place-actions{justify-content:flex-start;flex-wrap:wrap}
}

@media(max-width:560px){
  .poster-grid{max-width:420px;grid-template-columns:1fr;gap:12px}
  .poster,.poster-small,.poster-large{min-height:230px;max-height:280px}
  .place-photo,.place-photo img,.nf-location-empty{min-height:240px}
  .place-card{padding:16px;gap:22px}
  .place-actions{margin-top:18px}
}


/* ===== RSVP: clear neutral and selected states ===== */
.nf-rsvp-shell{
  --rsvp-option-bg:color-mix(in srgb,var(--card) 90%,transparent);
  --rsvp-option-hover:color-mix(in srgb,var(--accent) 12%,var(--card));
}

/* Все варианты по умолчанию нейтральные. Кнопка отправки остаётся акцентной. */
.nf-rsvp-shell label:has(input[type="radio"]),
.nf-rsvp-shell label:has(input[type="checkbox"]),
.nf-rsvp-shell .nf-choice,
.nf-rsvp-shell button.nf-choice,
.nf-rsvp-shell [role="button"].nf-choice{
  position:relative;
  background:var(--rsvp-option-bg)!important;
  color:var(--text)!important;
  border:1px solid var(--line)!important;
  box-shadow:none!important;
  opacity:1!important;
}

.nf-rsvp-shell label:has(input[type="radio"]):hover,
.nf-rsvp-shell label:has(input[type="checkbox"]):hover,
.nf-rsvp-shell .nf-choice:hover{
  background:var(--rsvp-option-hover)!important;
  border-color:color-mix(in srgb,var(--accent) 58%,var(--line))!important;
}

/* Выбор виден по самой заливке, контрасту и небольшой отметке. */
.nf-rsvp-shell label:has(input[type="radio"]:checked),
.nf-rsvp-shell label:has(input[type="checkbox"]:checked),
.nf-rsvp-shell .nf-choice.is-selected,
.nf-rsvp-shell .nf-choice[aria-pressed="true"]{
  background:var(--accent)!important;
  color:var(--accent-ink)!important;
  border-color:var(--accent)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent-ink) 14%,transparent)!important;
  transform:translateY(-1px);
}

.nf-rsvp-shell label:has(input[type="radio"]:checked) *,
.nf-rsvp-shell label:has(input[type="checkbox"]:checked) *,
.nf-rsvp-shell .nf-choice.is-selected *{
  color:inherit!important;
}

/* Служебные кнопки формы не получают галочку. */
.nf-rsvp-shell button[type="submit"],
.nf-rsvp-shell input[type="submit"]{
  background:var(--accent)!important;
  color:var(--accent-ink)!important;
  border-color:var(--accent)!important;
}
.nf-rsvp-shell button[type="submit"]::after,
.nf-rsvp-shell input[type="submit"]::after{
  content:none!important;
}

/* ===== Footer from Studio ===== */
.footer-word{
  display:grid;
  gap:.02em;
}
.footer-word span{
  display:block;
  min-width:0;
  overflow-wrap:anywhere;
}
.footer-word span:nth-child(2){
  color:transparent;
  -webkit-text-stroke:1px var(--text);
  text-stroke:1px var(--text);
}
@media (max-width:680px){
  .nf-rsvp-shell label:has(input[type="radio"]:checked)::after,
  .nf-rsvp-shell label:has(input[type="checkbox"]:checked)::after,
  .nf-rsvp-shell .nf-choice.is-selected::after,
  .nf-rsvp-shell .nf-choice[aria-pressed="true"]::after{
    width:18px;height:18px;font-size:11px;margin-left:6px;
  }
}

/* ===== Mobile gallery: compact cards without giant portrait crops ===== */
@media(max-width:560px){
  .visual-break .poster-grid{
    width:100%;
    max-width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    align-items:start;
  }

  .visual-break .poster,
  .visual-break .poster-small,
  .visual-break .poster-large{
    width:100%;
    min-width:0;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:4 / 5;
    border-radius:16px;
  }

  .visual-break .poster a{
    display:block;
    width:100%;
    height:100%;
    overflow:hidden;
  }

  .visual-break .poster img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center center;
  }

  .visual-break .poster span{
    left:11px;
    bottom:10px;
    font-size:8px;
    letter-spacing:.13em;
  }
}

@media(max-width:360px){
  .visual-break .poster-grid{gap:8px}
  .visual-break .poster,
  .visual-break .poster-small,
  .visual-break .poster-large{border-radius:14px}
}

/* Location photo toggle */
.place-card.place-card--no-photo{grid-template-columns:minmax(0,1fr)!important}

/* ===== Desktop content width =====
   На широких экранах держим секции в компактной центральной колонке,
   чтобы левая и правая части композиции не разъезжались по краям. */
@media (min-width: 901px){
  .section-pad{
    padding-left:max(76px, calc((100vw - 1320px) / 2));
    padding-right:max(76px, calc((100vw - 1320px) / 2));
  }

  .section-index{
    right:max(76px, calc((100vw - 1320px) / 2));
  }
}

/* ===== Desktop RSVP: wider and more compact ===== */
@media (min-width:901px){
  #rsvp .rsvp-grid{
    grid-template-columns:minmax(260px,.58fr) minmax(680px,1.42fr);
    gap:clamp(42px,5vw,78px);
    align-items:start;
  }

  #rsvp .nf-rsvp-shell{
    width:100%;
    padding:28px 34px;
  }

  #rsvp .nf-rsvp-shell .rsvpSection,
  #rsvp .nf-rsvp-shell .rsvpSection form{
    width:100%!important;
    max-width:none!important;
  }

  #rsvp .nf-rsvp-shell .rsvpSection .chips{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px 12px!important;
  }

  #rsvp .nf-rsvp-shell .rsvpSection .chips .chip{
    min-height:48px!important;
    padding-top:10px!important;
    padding-bottom:10px!important;
  }

  #rsvp .nf-rsvp-shell .rsvpSection{
    --rsvp-gap:18px;
  }
}

/* Accent running line spans the complete site width. */
.visual-break .marquee{
  width:110vw;
  min-width:110vw;
  margin-left:calc(50% - 55vw);
  margin-right:0;
}

@media (max-width:900px){
  .visual-break .marquee{
    width:max-content;
    min-width:110vw;
    margin-left:calc(50% - 55vw);
  }
}

/* ===== RSVP: remove the redundant outer frame ===== */
#rsvp .nf-rsvp-shell{
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

/* ===== Desktop RSVP heading: keep the complete title visible ===== */
@media (min-width:901px){
  #rsvp .rsvp-grid{
    grid-template-columns:minmax(500px,.82fr) minmax(720px,1.18fr);
    gap:clamp(36px,3.2vw,54px);
  }

  #rsvp .section-title{
    min-width:0;
    overflow:visible;
  }

  #rsvp .section-title h2{
    max-width:100%;
    font-size:clamp(62px,4.35vw,84px);
    line-height:.96;
    letter-spacing:-.045em;
    overflow:visible;
    text-wrap:balance;
  }
}

@media (min-width:901px) and (max-width:1280px){
  #rsvp .rsvp-grid{
    grid-template-columns:minmax(420px,.78fr) minmax(620px,1.22fr);
  }

  #rsvp .section-title h2{
    font-size:clamp(56px,5.2vw,72px);
  }
}
