@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fredoka-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fredoka-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/fredoka-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/fredoka-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cream: #fff6ec;
  --peach: #ffe8d6;
  --pink: #ffb7c5;
  --pink-deep: #ff7aa2;
  --mint: #6fbf74;
  --mint-soft: #d8f3dc;
  --sky: #a8d8ff;
  --sky-soft: #e8f4ff;
  --sun: #ffe566;
  --ink: #3a342e;
  --ink-soft: #6b6560;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 50px rgba(80, 50, 30, 0.14);
  --radius: 28px;
  --font: "Segoe UI", "PingFang HK", "Noto Sans HK", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fredoka", "Segoe UI", "PingFang HK", "Noto Sans HK", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,183,197,0.35), transparent 45%),
    radial-gradient(ellipse at 90% 30%, rgba(168,216,255,0.35), transparent 40%),
    radial-gradient(ellipse at 50% 90%, rgba(216,243,220,0.5), transparent 45%),
    var(--cream) url('/assets/bg-mobile.png') center top / cover fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #2f6fed; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Floating accents */
.deco {
  position: fixed;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
  animation: floaty 9s ease-in-out infinite;
}
.deco-leaf { top: 8%; left: 1%; width: 64px; }
.deco-flower { top: 22%; right: 1.5%; width: 54px; animation-delay: -2s; }
.deco-balloon { bottom: 28%; left: 2%; width: 48px; animation-delay: -4s; }
.deco-confetti { top: 55%; right: 1%; width: 64px; animation-delay: -1s; }
.deco-sprout { bottom: 12%; right: 3%; width: 50px; animation-delay: -3s; opacity: 0.6; }
.deco-leaf2 { top: 42%; left: 0.5%; width: 52px; animation-delay: -5s; opacity: 0.55; }
.deco-clover { top: 78%; right: 5%; width: 44px; animation-delay: -6s; opacity: 0.55; }
.deco-vine { top: 30%; left: 0; width: 36px; animation-delay: -7s; opacity: 0.5; }
.deco-sprout2 { bottom: 40%; right: 0.5%; width: 40px; animation-delay: -3.5s; opacity: 0.55; }
.deco-mushroom { top: 68%; left: 4%; width: 46px; animation-delay: -2.2s; opacity: 0.65; }
.deco-pebble { bottom: 2%; right: 18%; width: 90px; animation: none; opacity: 0.55; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.deco.char {
  opacity: 0.9;
  filter: drop-shadow(0 6px 12px rgba(60, 40, 20, 0.14));
}
.char-red { top: auto; bottom: 18%; left: 1%; width: 86px; animation-delay: -1.5s; }
.char-yellow { top: 14%; right: 1%; width: 78px; animation-delay: -4.5s; }
.char-blue { bottom: 4%; left: 10%; width: 74px; animation-delay: -2.8s; }

/* ===== Full-bleed invite card ===== */
.invite {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  max-width: 520px;
  margin: 0 auto;
  overflow: hidden;
  background: #1a1512;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2), var(--shadow);
}
@media (min-width: 560px) {
  .invite {
    margin: 1.25rem auto 0;
    min-height: calc(100svh - 1.25rem);
    border-radius: 32px;
  }
}
.invite-art {
  position: relative;
  min-height: 52svh;
  overflow: hidden;
}
.invite-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  min-height: 52svh;
}
.invite-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, #2a221c 0%, rgba(42,34,28,0.55) 45%, transparent 100%);
  pointer-events: none;
}
.invite-panel {
  position: relative;
  z-index: 1;
  margin-top: -4.5rem;
  padding: 0 1.35rem 1.5rem;
  text-align: center;
  color: #fff;
}
.invite .eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffe8d6;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin: 0 0 0.7rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.invite h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 9vw, 3.1rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.invite-facts {
  list-style: none;
  margin: 0 auto 1.25rem;
  padding: 0;
  max-width: 360px;
  text-align: left;
  display: grid;
  gap: 0.4rem;
}
.invite-facts li {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
}
.invite-facts span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--sun);
  font-size: 0.88rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  max-width: 380px;
  margin: 0 auto;
}
.scroll-hint {
  display: inline-block;
  margin-top: 1rem;
  color: rgba(255,255,255,0.55);
  font-size: 1.25rem;
  text-decoration: none !important;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 0.9; }
}

/* Content stack */
.wrap {
  width: min(520px, 94vw);
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.35rem;
  margin-bottom: 1.15rem;
}
.card-invite {
  position: relative;
  overflow: hidden;
}
.card-invite::before {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,183,197,0.35), transparent 70%);
  pointer-events: none;
}

h2 {
  font-family: var(--font-display);
  margin: 0 0 1.1rem;
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
}
.lead {
  text-align: center;
  color: var(--ink-soft);
  margin: -0.5rem 0 1.1rem;
  font-size: 0.98rem;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none !important;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.btn-lg {
  padding: 1.05rem 1.1rem;
  font-size: 1.05rem;
  min-height: 3.15rem;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--pink-deep), #ff5f93);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 95, 147, 0.4);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(255, 95, 147, 0.5); }
.btn-secondary {
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  border: 1.5px solid rgba(255,255,255,0.5);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.invite .btn-secondary {
  background: rgba(255,255,255,0.95);
  color: #3a342e;
}
.btn-ghost {
  background: var(--mint-soft);
  color: #245c2e;
}

.detail-grid, .agenda-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.detail-item, .agenda-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, rgba(232,244,255,0.65));
  border: 1px solid rgba(61,58,54,0.06);
}
.agenda-item {
  background: linear-gradient(145deg, rgba(216,243,220,0.45), #fff);
}
.detail-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--mint-soft), var(--sun));
  flex-shrink: 0;
}
.detail-icon img { width: 30px; height: 30px; }
.detail-item strong,
.agenda-item strong {
  font-family: var(--font-display);
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
  font-size: 1.05rem;
}
.detail-item span,
.agenda-item span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}
.detail-item span + span { margin-top: 0.15rem; }

.map-embed {
  border: 0;
  width: 100%;
  height: 240px;
  border-radius: 18px;
  background: #e8e8e8;
}
.map-note {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
}

.gift-box {
  background: linear-gradient(135deg, var(--mint-soft), var(--sky-soft));
  border-radius: 18px;
  padding: 1.25rem 1.3rem;
  text-align: center;
}
.gift-box p { margin: 0.35rem 0; }
.gift-box strong { font-family: var(--font-display); font-size: 1.1rem; }

form { display: grid; gap: 0.95rem; }
label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}
label .hint, .field-label {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.field-label {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
input, select, textarea {
  font: inherit;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(61, 58, 54, 0.12);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--pink);
  border-color: transparent;
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.attendance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.attendance input { display: none; }
.attendance label {
  text-align: center;
  padding: 0.85rem 0.4rem;
  border-radius: 14px;
  border: 1.5px solid rgba(61, 58, 54, 0.1);
  background: #fff;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
}
.attendance input:checked + label {
  border-color: var(--pink-deep);
  background: rgba(255, 183, 197, 0.28);
  color: #a61e4d;
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; justify-content: center; }
.form-actions .btn-primary { min-width: 200px; }
.msg {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-size: 0.95rem;
  display: none;
}
.msg.show { display: block; }
.msg.ok { background: var(--mint-soft); color: #1e5a28; }
.msg.err { background: #ffe0e6; color: #8a1c3a; }
.edit-link {
  word-break: break-all;
  font-size: 0.85rem;
  background: #fff;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  margin-top: 0.5rem;
}

footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 0.5rem 0 2rem;
}
footer a { color: var(--ink-soft); }

@media (max-width: 480px) {
  .row-2 { grid-template-columns: 1fr; }
  .deco:not(.char) { width: 38px !important; opacity: 0.45; }
  .deco-vine { width: 28px !important; }
  .deco-pebble { width: 70px !important; }
  .char-red { width: 62px !important; bottom: 22%; }
  .char-yellow { width: 56px !important; }
  .char-blue { width: 54px !important; left: 2%; }
  .invite-panel { padding-left: 1.1rem; padding-right: 1.1rem; }
  .cta-grid { gap: 0.55rem; }
}
