:root {
  --paper: #faf6ee;
  --paper-2: #f3ecdd;
  --card: #fffdf8;
  --green: #3f5e3b;
  --green-deep: #2c4429;
  --gold: #b8955a;
  --gold-soft: #d9c39a;
  --rose: #b4566a;
  --marigold: #d98a1f;
  --ink: #2b2a24;
  --muted: #6f6a5c;
  --line: #e6dcc6;
  --danger: #a33a2c;
  --ok: #3f7a3b;
  --radius: 14px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Italianno', 'Great Vibes', cursive;
  --caps: 'Cinzel', 'Cormorant Garamond', serif;
  --tabbar: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--green); }
.hidden { display: none !important; }

/* Frame like the invite: green border + gold dotted rule */
.frame {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  border: 6px solid var(--green);
}
.frame::after {
  content: ''; position: absolute; inset: 8px;
  border: 2px dotted var(--gold-soft);
}

.shell {
  position: relative; z-index: 1;
  max-width: 720px; margin: 0 auto;
  padding: 22px 20px calc(var(--tabbar) + 32px + env(safe-area-inset-bottom));
}

.tag { font-family: var(--caps); letter-spacing: .18em; font-size: 12px; color: var(--gold); text-transform: uppercase; }
.script { font-family: var(--script); font-weight: 400; line-height: .9; }
h1, h2, h3 { font-weight: 600; margin: 0; }
h2 { font-size: 30px; color: var(--green-deep); }
h3 { font-size: 23px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* Hero */
.hero { text-align: center; padding: 18px 0 8px; position: relative; }
.hero .names { font-size: 72px; color: var(--green-deep); margin: 6px 0 0; }
.hero .amp { font-family: var(--caps); font-size: 16px; color: var(--gold); letter-spacing: .3em; display: block; margin: 2px 0; }
.hero .meta { font-size: 18px; color: var(--muted); margin-top: 8px; }
.hero .hashtag { font-family: var(--caps); color: var(--rose); letter-spacing: .08em; font-size: 15px; margin-top: 6px; }
.hero .flora { position: absolute; top: -6px; width: 92px; opacity: .95; }
.hero .flora.l { left: 0; transform: rotate(-12deg); }
.hero .flora.r { right: 0; transform: scaleX(-1) rotate(-12deg); }

.divider { display: flex; align-items: center; gap: 12px; color: var(--gold); margin: 22px 0 14px; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px dotted var(--gold-soft); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px;
  margin: 14px 0;
  box-shadow: 0 1px 0 rgba(63, 94, 59, .04), 0 6px 18px -12px rgba(63, 94, 59, .25);
}
.card.now { border-color: var(--green); background: linear-gradient(180deg, #fbfdf7, var(--card)); }
.card.now .tag { color: var(--green); }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c0392b; margin-right: 6px; vertical-align: 1px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.countdown { display: flex; justify-content: center; gap: 10px; margin: 10px 0 2px; }
.countdown div { min-width: 64px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; }
.countdown b { display: block; font-size: 30px; color: var(--green-deep); line-height: 1; }
.countdown span { font-family: var(--caps); font-size: 10px; letter-spacing: .15em; color: var(--muted); }

/* Updates feed */
.update { padding: 12px 0; border-top: 1px dotted var(--line); }
.update:first-child { border-top: 0; padding-top: 2px; }
.update p { margin: 0 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.update time { font-size: 14px; color: var(--muted); }

/* Schedule */
.day-head { margin: 26px 0 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.day-head .date { font-size: 44px; color: var(--green-deep); font-family: var(--script); line-height: .8; }
.event .time { font-family: var(--caps); font-size: 14px; letter-spacing: .12em; color: var(--rose); }
.event h3 { margin: 2px 0 4px; color: var(--green-deep); }
.event .blurb { font-style: italic; color: var(--muted); margin: 0 0 8px; }
.event .note { background: #fff4dc; border-left: 3px solid var(--marigold); padding: 6px 10px; border-radius: 6px; margin: 8px 0; font-size: 17px; }
.event .dress { font-size: 17px; margin: 6px 0; }
.event .dress b { font-family: var(--caps); font-size: 11px; letter-spacing: .15em; color: var(--gold); font-weight: 600; display: block; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0; }
.swatch { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.swatch i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); display: inline-block; }
details.wear summary { cursor: pointer; color: var(--green); font-size: 16px; list-style: none; }
details.wear summary::-webkit-details-marker { display: none; }
details.wear summary::before { content: '＋ '; }
details.wear[open] summary::before { content: '－ '; }
details.wear p { margin: 6px 0; font-size: 17px; }
.badge-now { background: var(--green); color: #fff; font-family: var(--caps); font-size: 10px; letter-spacing: .15em; padding: 3px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 3px; }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--green);
  background: var(--green); color: #fff; font-family: var(--caps); font-size: 14px; letter-spacing: .12em;
  cursor: pointer; text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--green-deep); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--green); }
.btn.ghost:hover { background: rgba(63, 94, 59, .07); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 12px; }
.btn.block { width: 100%; }
.field { display: block; margin: 12px 0; }
.field span { display: block; font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.input {
  width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 20px;
}
.input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.otp { letter-spacing: .5em; text-align: center; font-size: 26px; }
.error { color: var(--danger); font-size: 16px; margin: 8px 0 0; }
.okmsg { color: var(--ok); font-size: 16px; margin: 8px 0 0; }

/* Login */
.login { max-width: 420px; margin: 0 auto; }
.login .hero .names { font-size: 64px; }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  background: rgba(250, 246, 238, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar nav { display: flex; width: 100%; max-width: 720px; }
.tabbar a {
  flex: 1; height: var(--tabbar); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-family: var(--caps); font-size: 10px; letter-spacing: .14em;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--green-deep); }
.tabbar a.up span.dot { width: 44px; height: 44px; border-radius: 50%; background: var(--rose); color: #fff; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 6px 14px -6px rgba(180, 86, 106, .8); }
.tabbar a.up span.dot svg { width: 22px; height: 22px; }

/* Gallery */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 16px; white-space: nowrap; }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; aspect-ratio: 1; background: var(--paper-2); border: 0; padding: 0; cursor: pointer; overflow: hidden; border-radius: 4px; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.tile .play { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20, 22, 18, .96); display: flex; flex-direction: column; }
.lightbox .bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); color: #eee; }
.lightbox .bar .who { flex: 1; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox .bar button, .lightbox .bar a { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 99px; min-height: 40px; padding: 0 14px; font-size: 15px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.lightbox .stage { flex: 1; display: grid; place-items: center; min-height: 0; padding: 8px; }
.lightbox .stage img, .lightbox .stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.lightbox .nav.prev { left: 8px; } .lightbox .nav.next { right: 8px; }

/* Upload */
.drop { text-align: center; padding: 26px 18px; border: 2px dashed var(--gold-soft); border-radius: var(--radius); background: var(--card); }
.drop .big { font-size: 26px; color: var(--green-deep); margin: 6px 0 14px; }
.queue { list-style: none; padding: 0; margin: 12px 0; }
.queue li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px dotted var(--line); }
.queue .qthumb { width: 48px; height: 48px; border-radius: 8px; background: var(--paper-2); object-fit: cover; flex: none; }
.queue .qinfo { flex: 1; min-width: 0; }
.queue .qname { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .qstatus { font-size: 14px; color: var(--muted); }
.queue .qstatus.err { color: var(--danger); }
.queue .qstatus.done { color: var(--ok); }
.bar-track { height: 5px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bar-fill { height: 100%; background: var(--green); width: 0; transition: width .2s; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--green-deep); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 16px; z-index: 60; max-width: calc(100% - 32px); text-align: center; }

.venue p { margin: 4px 0; }
.foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 30px; }
.gurmukhi { font-family: 'Noto Serif Gurmukhi', serif; color: var(--rose); text-align: center; font-size: 18px; line-height: 1.6; }

.hero .amp-i { font-size: .6em; }
@media (max-width: 520px) {
  .hero .names .nm, .hero .names .amp-i { display: block; }
  .hero .names .amp-i { font-family: var(--caps); font-size: 15px; letter-spacing: .3em; color: var(--gold); margin: 4px 0; }
}
@media (max-width: 380px) {
  .hero .names { font-size: 60px; }
  .hero .flora { width: 70px; }
}
