:root {
  color-scheme: dark;
  --black: #050305;
  --panel: rgba(18, 9, 16, 0.88);
  --gold: #d9a83e;
  --gold-light: #f5d77c;
  --pink: #c21368;
  --text: #f8f1eb;
  --muted: #c9bdc4;
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(87, 5, 52, .22), transparent 30rem),
    radial-gradient(circle at 85% 70%, rgba(91, 39, 111, .15), transparent 27rem),
    var(--black);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background-image: radial-gradient(rgba(255, 216, 118, .36) .6px, transparent .6px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

main { width: min(100% - 28px, 780px); margin: 0 auto; padding: 52px 0 24px; }

.intro { text-align: center; margin-bottom: 26px; }
.eyebrow { margin: 0 0 8px; color: var(--gold); font: 600 .75rem/1.2 system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; color: var(--gold-light); font-size: clamp(2.35rem, 10vw, 4.8rem); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
h1 span { display: block; color: var(--pink); font-size: .42em; font-style: italic; letter-spacing: .04em; text-transform: none; }
.subtitle { margin-bottom: 0; color: var(--muted); font-size: clamp(.95rem, 3vw, 1.1rem); }

.invitation-wrap {
  position: relative;
  isolation: isolate;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(217, 168, 62, .48);
  border-radius: 16px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .7), 0 0 30px rgba(206, 137, 23, .13);
}

.invitation { display: block; width: 100%; height: auto; }
.image-shine {
  position: absolute;
  z-index: 2;
  inset: -40%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 231, 160, .18) 48%, transparent 54%);
  transform: translateX(-70%);
  animation: shine 8s ease-in-out infinite;
  mix-blend-mode: screen;
}

.monogram-highlight {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  filter: brightness(1.48) saturate(1.12) drop-shadow(0 0 4px rgba(255, 224, 132, .72));
  -webkit-mask-image: radial-gradient(circle at 67.4% 13.2%, #000 0 9.7%, transparent 12.4%);
  mask-image: radial-gradient(circle at 67.4% 13.2%, #000 0 9.7%, transparent 12.4%);
  animation: monogram-reveal 5.8s ease-in-out infinite;
  mix-blend-mode: screen;
}

.actions { display: grid; gap: 12px; margin: 24px 0 42px; }
.action {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid rgba(217, 168, 62, .38);
  border-radius: 14px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(42, 21, 34, .98), rgba(12, 7, 11, .98));
  box-shadow: 0 9px 24px rgba(0, 0, 0, .36);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.action:hover, .action:focus-visible { transform: translateY(-2px); border-color: var(--gold-light); box-shadow: 0 12px 32px rgba(194, 19, 104, .15); outline: none; }
.action-icon { width: 42px; font-size: 1.5rem; }
.action span:last-child { display: flex; flex-direction: column; gap: 4px; }
.action strong { color: var(--gold-light); font: 600 1.04rem/1.1 system-ui, sans-serif; }
.action small { color: var(--muted); font: .8rem/1.2 system-ui, sans-serif; }
.action-confirm { border-color: rgba(58, 189, 100, .5); }

.music-section { margin: 0 0 42px; padding: 22px; border: 1px solid rgba(217, 168, 62, .3); border-radius: 18px; background: linear-gradient(145deg, rgba(33, 14, 27, .96), rgba(9, 5, 8, .96)); box-shadow: 0 18px 48px rgba(0, 0, 0, .36); }
.music-heading { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; text-align: center; }
.music-heading > span { color: var(--gold-light); font-size: 2rem; text-shadow: 0 0 18px rgba(245, 215, 124, .5); }
.music-heading h2 { margin-bottom: 0; color: var(--gold-light); font-size: clamp(1.45rem, 5vw, 2rem); font-weight: 400; }
.track-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.track { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 12px; border: 1px solid rgba(217, 168, 62, .2); border-radius: 11px; color: var(--text); background: rgba(255, 255, 255, .025); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.track:hover, .track:focus-visible { border-color: var(--gold); transform: translateY(-1px); outline: none; }
.track.active { border-color: var(--pink); background: rgba(194, 19, 104, .11); }
.track-play { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(217, 168, 62, .5); border-radius: 50%; color: var(--gold-light); font: .65rem/1 system-ui, sans-serif; }
.track.active .track-play { color: #160a11; background: var(--gold-light); }
.track span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.track strong { color: var(--gold-light); font: 600 .78rem/1.15 system-ui, sans-serif; }
.track small { color: var(--muted); font: .68rem/1.25 system-ui, sans-serif; }
.audio-shell { margin-top: 14px; padding: 13px 14px; border-radius: 11px; background: rgba(0, 0, 0, .32); }
.audio-shell p { margin-bottom: 9px; color: var(--muted); font: .74rem/1.2 system-ui, sans-serif; }
.audio-shell p strong { color: var(--gold-light); }
.audio-shell audio { display: block; width: 100%; height: 40px; accent-color: var(--pink); }
.music-credit { margin: 13px 2px 0; color: #988b93; font: .66rem/1.45 system-ui, sans-serif; text-align: center; }
.music-credit a { color: #c3a85f; }

.countdown-section { margin: 0 0 42px; text-align: center; }
.countdown-section h2, .section-heading h2, .directions-dialog h2 { font-size: clamp(1.5rem, 5vw, 2.15rem); font-weight: 400; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown div { padding: 16px 4px; border: 1px solid rgba(217, 168, 62, .22); border-radius: 12px; background: var(--panel); }
.countdown strong { display: block; color: var(--gold-light); font-size: clamp(1.45rem, 7vw, 2.4rem); font-weight: 400; font-variant-numeric: tabular-nums; }
.countdown span { color: var(--muted); font: .66rem/1 system-ui, sans-serif; text-transform: uppercase; }

.details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section-heading { grid-column: 1 / -1; margin-bottom: 4px; text-align: center; }
.details article { display: flex; gap: 12px; padding: 18px; border: 1px solid rgba(217, 168, 62, .24); border-radius: 14px; background: var(--panel); }
.details article > span { font-size: 1.3rem; }
.details h3 { margin-bottom: 6px; color: var(--gold); font: 600 .78rem/1.2 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.details p { margin-bottom: 0; color: var(--muted); font: .88rem/1.55 system-ui, sans-serif; }
.deadline { margin: 24px auto 0; color: var(--muted); font: .9rem/1.5 system-ui, sans-serif; text-align: center; }
.deadline strong { color: var(--gold-light); }

footer { padding: 28px 20px 48px; color: var(--pink); font-size: clamp(1.05rem, 4vw, 1.3rem); text-align: center; }
footer span { color: var(--gold); }
footer p { margin: 8px 0 0; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.glow { position: absolute; width: 240px; height: 240px; border-radius: 50%; filter: blur(80px); opacity: .13; }
.glow-one { top: 4%; left: -120px; background: var(--pink); }
.glow-two { right: -120px; bottom: 5%; background: #6c21a3; }
.sparkle { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 16px 5px rgba(245, 215, 124, .5); animation: twinkle 3s ease-in-out infinite; }
.sparkle-one { top: 8%; left: 8%; }
.sparkle-two { top: 33%; right: 6%; animation-delay: 1s; }
.sparkle-three { top: 72%; left: 5%; animation-delay: 2s; }

.directions-dialog, .gifts-dialog { border: 1px solid var(--gold); border-radius: 18px; color: var(--text); background: #100a0e; box-shadow: 0 30px 90px #000; }
.directions-dialog { width: min(calc(100% - 32px), 480px); padding: 28px; }
.directions-dialog::backdrop, .gifts-dialog::backdrop { background: rgba(0, 0, 0, .82); backdrop-filter: blur(5px); }
.directions-dialog > p:not(.eyebrow) { color: var(--muted); font: .9rem/1.5 system-ui, sans-serif; }
.dialog-close { position: absolute; top: 8px; right: 12px; border: 0; color: var(--muted); background: none; font-size: 2rem; cursor: pointer; }
.map-options { display: grid; gap: 10px; margin-top: 22px; }
.map-options a { padding: 15px; border: 1px solid rgba(217, 168, 62, .4); border-radius: 10px; color: var(--gold-light); font: 600 .9rem/1 system-ui, sans-serif; text-align: center; text-decoration: none; }

.gifts-dialog { width: min(calc(100% - 24px), 680px); max-height: min(88vh, 820px); padding: 0; overflow-x: hidden; }
.gifts-dialog[open] { animation: dialog-in .28s ease-out; }
.gifts-heading { padding: 34px 28px 22px; border-bottom: 1px solid rgba(217, 168, 62, .2); text-align: center; background: radial-gradient(circle at 50% 0, rgba(194, 19, 104, .22), transparent 70%); }
.gift-mark { display: block; margin-bottom: 10px; font-size: 2rem; filter: drop-shadow(0 0 10px rgba(217, 168, 62, .45)); }
.gifts-heading h2 { margin-bottom: 8px; color: var(--gold-light); font-size: clamp(1.8rem, 7vw, 2.65rem); font-weight: 400; }
.gifts-heading > p:last-child { max-width: 510px; margin: 0 auto; color: var(--muted); font: .88rem/1.55 system-ui, sans-serif; }

.pix-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 22px 22px 12px; padding: 18px; border: 1px solid rgba(217, 168, 62, .52); border-radius: 14px; background: linear-gradient(135deg, rgba(90, 50, 7, .25), rgba(194, 19, 104, .12)); }
.gift-card-icon { color: var(--gold-light); font-size: 1.7rem; }
.pix-card h3, .gift-grid h3 { margin-bottom: 4px; color: var(--gold-light); font: 600 .85rem/1.25 system-ui, sans-serif; }
.pix-card p, .gift-grid p { margin-bottom: 0; color: var(--muted); font: .78rem/1.4 system-ui, sans-serif; }
.pix-card strong { display: block; margin-top: 5px; color: var(--text); font: 700 1.08rem/1.2 system-ui, sans-serif; letter-spacing: .05em; }
.pix-card button { padding: 11px 14px; border: 1px solid var(--gold); border-radius: 9px; color: #140b0f; background: var(--gold-light); font: 700 .75rem/1 system-ui, sans-serif; cursor: pointer; }
.pix-card button:hover, .pix-card button:focus-visible { background: #fff0ae; outline: none; }

.gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 22px 18px; }
.gift-grid article { display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 14px; border: 1px solid rgba(217, 168, 62, .18); border-radius: 12px; background: rgba(255, 255, 255, .025); }
.gift-grid article > span { min-width: 30px; font-size: 1.35rem; text-align: center; }
.gift-grid .anime-icon { display: grid; place-items: center; }
.anime-icon img { display: block; width: 31px; height: 28px; object-fit: cover; border-radius: 3px; }
.gifts-note { margin: 0; padding: 18px 28px 26px; border-top: 1px solid rgba(217, 168, 62, .16); color: var(--pink); font-size: .97rem; font-style: italic; line-height: 1.5; text-align: center; }

.toast { position: fixed; z-index: 20; right: 16px; bottom: 16px; left: 16px; max-width: 460px; margin: auto; padding: 14px 18px; border: 1px solid var(--gold); border-radius: 12px; color: var(--text); background: #180d14; box-shadow: 0 16px 50px #000; font: .88rem/1.4 system-ui, sans-serif; text-align: center; transform: translateY(160%); transition: transform .3s ease; }
.toast.visible { transform: translateY(0); }

@keyframes shine { 0%, 55% { transform: translateX(-70%); } 75%, 100% { transform: translateX(70%); } }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes monogram-reveal {
  0%, 18%, 100% { opacity: 0; }
  42% { opacity: .22; }
  55% { opacity: .52; }
  72% { opacity: .13; }
}

@media (min-width: 640px) {
  main { padding-top: 70px; }
  .actions { grid-template-columns: repeat(3, 1fr); }
  .action { align-items: flex-start; min-height: 116px; flex-direction: column; gap: 10px; }
  .action-icon { width: auto; }
}

@media (max-width: 520px) {
  .details { grid-template-columns: 1fr; }
  .section-heading { grid-column: auto; }
  .gift-grid { grid-template-columns: 1fr; }
  .pix-card { grid-template-columns: auto 1fr; }
  .pix-card button { grid-column: 1 / -1; width: 100%; }
  .music-section { padding: 18px 14px; }
  .track-list { grid-template-columns: 1fr; }
  .track { min-height: 64px; }
}

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