/* Vivaah Planner — design system
   Palette: rani pink (action), marigold (attention), mehendi green (done), plum ink.
   Type: Marcellus for display, Figtree for UI. */

:root {
  --bg: #FBF6F8;
  --surface: #FFFFFF;
  --sunk: #F5ECF1;
  --line: #EADBE3;
  --line-strong: #D9C3CF;
  --ink: #2A1630;
  --ink-2: #4A3450;
  --muted: #7A6680;
  --rani: #B0185A;
  --rani-hover: #951249;
  --rani-soft: #F9E1EC;
  --marigold: #B87400;
  --marigold-bright: #E8A317;
  --marigold-soft: #FCEFD3;
  --mehendi: #45622A;
  --mehendi-soft: #E4EDD6;
  --sky: #2D5DA8;
  --sky-soft: #E1EAF8;
  --danger: #B3261E;
  --danger-soft: #FBE3E1;
  --on-accent: #FFFFFF;
  --shadow: 0 1px 2px rgba(60, 20, 50, .05), 0 8px 24px -12px rgba(60, 20, 50, .18);
  --shadow-lg: 0 24px 60px -20px rgba(60, 20, 50, .35);
  --display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --body: "Figtree", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --sidebar: 256px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140B17;
    --surface: #1E1323;
    --sunk: #26192C;
    --line: #36263E;
    --line-strong: #4A3553;
    --ink: #F6EAF1;
    --ink-2: #DCCBE0;
    --muted: #B09CB5;
    --rani: #F0689C;
    --rani-hover: #F584AE;
    --rani-soft: #43182F;
    --marigold: #F2B544;
    --marigold-bright: #F2B544;
    --marigold-soft: #3D2C0C;
    --mehendi: #A6C46C;
    --mehendi-soft: #243019;
    --sky: #8DB3F0;
    --sky-soft: #1B2840;
    --danger: #F28B82;
    --danger-soft: #3F1714;
    --on-accent: #1A0C14;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1, h2, .display { font-family: var(--display); font-weight: 400; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--rani); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
svg { width: 18px; height: 18px; flex: none; }
.pill svg { width: 12px; height: 12px; }
[hidden] { display: none !important; }
.num, table { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.tiny { font-size: .74rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--rani); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--rani); outline-offset: 2px; }

/* ── App shell ─────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sunk); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; color: var(--ink); text-decoration: none !important; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--rani); color: var(--on-accent); font-family: var(--display); font-size: 1.2rem;
}
.brand span:last-child { display: flex; flex-direction: column; font-family: var(--display); font-size: 1.2rem; line-height: 1.1; }
.brand small { font-family: var(--body); font-size: .7rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.wedding-chip {
  margin: 0 4px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.wedding-chip .names { font-family: var(--display); font-size: 1.1rem; }
.wedding-chip .when { font-size: .78rem; color: var(--muted); }
.wedding-chip .togo { font-size: .78rem; font-weight: 600; color: var(--rani); }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 4px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
  color: var(--ink-2); font-size: .92rem; text-decoration: none !important;
}
.nav-item svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--rani); }
.nav-item.active svg { color: var(--rani); }
.nav-item .count { margin-left: auto; font-size: .7rem; padding: 1px 7px; border-radius: 99px; background: var(--rani-soft); color: var(--rani); font-weight: 600; }
.me { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 6px 0; display: flex; flex-direction: column; gap: 8px; }
.me-row { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--marigold-soft); color: var(--marigold); font-weight: 700; font-size: .8rem;
}
.me-name { display: flex; flex-direction: column; min-width: 0; }
.me-name b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-name span { font-size: .74rem; color: var(--muted); }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: none; position: sticky; top: 0; z-index: 20; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar .names { font-family: var(--display); font-size: 1.05rem; }
.page { padding: 28px 32px 64px; max-width: 1240px; width: 100%; display: flex; flex-direction: column; gap: 22px; }
.scrim { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(290px, 86vw);
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  .menu-open .sidebar { transform: none; }
  .menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(20, 8, 20, .45); }
  .topbar { display: flex; }
  .page { padding: 18px 16px 80px; }
}

/* ── Page header ─────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-head p { color: var(--muted); max-width: 64ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .9rem; font-weight: 500; line-height: 1;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: var(--sunk); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--rani); border-color: var(--rani); color: var(--on-accent); }
.btn.primary:hover { background: var(--rani-hover); border-color: var(--rani-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--sunk); }
.btn.danger { color: var(--danger); border-color: var(--danger-soft); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 7px 10px; font-size: .82rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--rani); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ── Cards, panels, stats ─────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3, .g-main { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .g4 { grid-template-columns: 1fr 1fr; gap: 10px; } }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat .v { font-size: 1.6rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.stat .l { font-size: .8rem; color: var(--muted); }
.stat.accent { background: var(--rani); border-color: var(--rani); color: var(--on-accent); }
.stat.accent .l, .stat.accent .v small { color: var(--on-accent); opacity: .85; }

.bar { height: 7px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--rani); transition: width .4s ease; }
.bar.ok > i { background: var(--mehendi); }
.bar.warn > i { background: var(--marigold-bright); }
.bar.over > i { background: var(--danger); }
.stat .bar { margin-top: 8px; }

/* ── Pills & chips ─────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; line-height: 1.4; }
.pill.ok { background: var(--mehendi-soft); color: var(--mehendi); }
.pill.warn { background: var(--marigold-soft); color: var(--marigold); }
.pill.late, .pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--sky-soft); color: var(--sky); }
.pill.mute { background: var(--sunk); color: var(--muted); }
.pill.rani { background: var(--rani-soft); color: var(--rani); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .82rem; padding: 6px 12px; border-radius: 99px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--rani); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-dots { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ev-dot {
  min-width: 26px; height: 24px; padding: 0 6px; border-radius: 7px; border: 0; font: inherit; font-size: .7rem; font-weight: 700;
  display: inline-grid; place-items: center; cursor: pointer;
}
.ev-dot.s0 { background: var(--marigold-soft); color: var(--marigold); }
.ev-dot.s1 { background: var(--mehendi-soft); color: var(--mehendi); }
.ev-dot.s2 { background: var(--sunk); color: var(--muted); text-decoration: line-through; }
.ev-dot.s3 { background: var(--sky-soft); color: var(--sky); }
.ev-dot.none { background: transparent; color: var(--line-strong); border: 1px dashed var(--line-strong); }
.ev-dot[disabled] { cursor: default; }

/* ── Tables ─────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--sunk); white-space: nowrap; position: sticky; top: 0; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
table.t td.actions-cell { white-space: nowrap; text-align: right; }
table.t .sub { display: block; font-size: .78rem; color: var(--muted); }
table.t.compact td, table.t.compact th { padding: 8px 12px; }
table.t th.right, table.t td.right { text-align: right; }
table.t tfoot td { border-top: 1px solid var(--line); border-bottom: 0; background: var(--sunk); }
.input.qty { width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.input.qty.money { width: 96px; }

/* ── List rows ─────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-row:last-child { border-bottom: 0; }
.list-row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-row .main b { font-weight: 600; font-size: .92rem; }
.list-row .main span { font-size: .8rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line-strong); }
.dot.rani { background: var(--rani); } .dot.warn { background: var(--marigold-bright); } .dot.ok { background: var(--mehendi); } .dot.bad { background: var(--danger); }

/* ── Forms ─────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .76rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: .93rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--rani); box-shadow: 0 0 0 3px var(--rani-soft); }
.input.sm, .select.sm { min-height: 34px; padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--rani); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.switch { display: inline-block; vertical-align: middle; position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: var(--surface); border-radius: 50%; transition: transform .2s; }
.switch input:checked + span { background: var(--mehendi); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--rani); outline-offset: 2px; }
.search { position: relative; min-width: 200px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search .input { padding-left: 34px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .select { width: auto; min-width: 140px; }
.alert { padding: 12px 14px; border-radius: var(--r); font-size: .9rem; }
.alert.err { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--mehendi-soft); color: var(--mehendi); }
.alert.info { background: var(--marigold-soft); color: var(--ink-2); }

/* ── Tabs ─────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  font: inherit; font-size: .9rem; background: none; border: 0; padding: 10px 14px; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--rani); font-weight: 600; }
.seg { display: inline-flex; background: var(--sunk); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-size: .84rem; border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

/* ── Modal ─────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(20, 8, 20, .5); animation: fade .15s ease; }
.modal {
  position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
.modal.wide { width: min(820px, calc(100vw - 24px)); }
.modal header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 12px; }
.modal-body { padding: 4px 20px 16px; overflow-y: auto; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal footer .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } }
@media (max-width: 560px) {
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92vh; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, 8%); } }
}

/* ── Toasts ─────────────────────────────── */
.toasts { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .9rem; animation: rise .2s ease; max-width: 360px; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ── Empty state ─────────────────────────────── */
.empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); }
.empty .ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--rani-soft); color: var(--rani); }
.empty .ring svg { width: 24px; height: 24px; }
.empty h3 { color: var(--ink); font-size: 1.05rem; }
.empty p { max-width: 42ch; font-size: .9rem; }

/* ── Dashboard ─────────────────────────────── */
.hero-band {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 26px 28px;
  background: var(--ink); color: var(--bg); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.hero-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--marigold-bright) 55%, transparent);
  box-shadow: 0 0 0 22px color-mix(in srgb, var(--marigold-bright) 8%, transparent), 0 0 0 44px color-mix(in srgb, var(--marigold-bright) 5%, transparent);
  pointer-events: none;
}
.hero-band h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.hero-band .sub { opacity: .75; font-size: .92rem; }
.countdown { display: flex; gap: 18px; position: relative; z-index: 1; }
.countdown div { display: flex; flex-direction: column; align-items: center; }
.countdown b { font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--marigold-bright); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin-top: 4px; }
.fn-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.fn-row:last-child { border-bottom: 0; }
.fn-row .d { color: var(--muted); font-size: .82rem; }

/* ── Kanban ─────────────────────────────── */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.col { background: var(--sunk); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; }
.col-head h3 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.task-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; gap: 10px; align-items: flex-start; }
.task-card.done .title { text-decoration: line-through; color: var(--muted); }
.task-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.task-card .title { font-weight: 500; font-size: .92rem; cursor: pointer; }
.task-card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .76rem; color: var(--muted); }
.tick {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface);
  flex: none; cursor: pointer; display: grid; place-items: center; margin-top: 1px; padding: 0; color: var(--on-accent);
}
.tick svg { width: 13px; height: 13px; opacity: 0; }
.tick.on { background: var(--mehendi); border-color: var(--mehendi); }
.tick.on svg { opacity: 1; }
.prio-2 { box-shadow: inset 3px 0 0 var(--danger); }

/* ── Function cards ─────────────────────────────── */
.fn-card { display: flex; flex-direction: column; gap: 12px; }
.fn-card .date-badge {
  width: 54px; flex: none; border-radius: 12px; overflow: hidden; text-align: center; border: 1px solid var(--line);
}
.fn-card .date-badge span { display: block; background: var(--rani); color: var(--on-accent); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; padding: 2px 0; font-weight: 700; }
.fn-card .date-badge b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; padding: 2px 0 4px; }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; font-size: .88rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }

/* ── Budget ─────────────────────────────── */
.cat-row { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cat-row:last-child { border-bottom: 0; }
.cat-row .top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.cat-row .top b { font-weight: 600; }
.cat-row .amt { font-size: .86rem; color: var(--muted); }
.cat-row .amt strong { color: var(--ink); }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ── Timeline (day-of) ─────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 76px 18px 1fr; gap: 12px; }
.tl .time { font-weight: 700; font-size: .92rem; padding-top: 12px; font-variant-numeric: tabular-nums; }
.tl .rail { position: relative; }
.tl .rail::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl .rail::after { content: ""; position: absolute; left: 3px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--marigold-bright); }
.tl.live .rail::after { background: var(--rani); border-color: var(--rani); box-shadow: 0 0 0 5px var(--rani-soft); }
.tl.done .rail::after { background: var(--mehendi); border-color: var(--mehendi); }
.tl:first-child .rail::before { top: 16px; }
.tl:last-child .rail::before { bottom: calc(100% - 20px); }
.tl .item { padding: 8px 12px 14px; border-radius: var(--r); margin-bottom: 6px; display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.tl.live .item { background: var(--rani-soft); }
.tl.done .item { opacity: .6; }
.tl .item .grow b { display: block; }

/* ── QR passes ─────────────────────────────── */
.passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pass { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; break-inside: avoid; }
.pass .couple { font-family: var(--display); font-size: .95rem; color: var(--rani); }
.pass img { width: 150px; height: 150px; image-rendering: pixelated; background: #fff; border-radius: 8px; padding: 6px; }
.pass b { font-size: 1rem; }
.scanner { width: 100%; max-width: 420px; aspect-ratio: 1; background: var(--sunk); border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.scan-result { border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.scan-result.ok { background: var(--mehendi-soft); }
.scan-result.warn { background: var(--marigold-soft); }
.scan-result.bad { background: var(--danger-soft); }

/* ── Shopping ─────────────────────────────── */
.shop-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shop-item:last-child { border-bottom: 0; }
.shop-item.bought .name { text-decoration: line-through; color: var(--muted); }
.shop-item .name { flex: 1; min-width: 0; font-size: .92rem; }

/* ── Public site ─────────────────────────────── */
.pub-body { min-height: 100vh; display: flex; flex-direction: column; }
.pub-nav { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; max-width: 1100px; margin: 0 auto; width: 100%; }
.pub-hero { position: relative; text-align: center; padding: 56px 20px 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pub-frame {
  position: relative; max-width: 720px; width: 100%; margin: 0 auto; background: var(--surface); border: 1px solid var(--line);
  padding: 48px 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.pub-frame::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--marigold-bright); opacity: .55; pointer-events: none; }
.pub-frame::after { content: ""; position: absolute; inset: 16px; border: 1px solid var(--marigold-bright); opacity: .25; pointer-events: none; }
.pub-names { font-family: var(--display); font-size: clamp(2.4rem, 8vw, 4.4rem); line-height: 1.05; }
.pub-names .amp { display: block; font-size: .5em; color: var(--rani); margin: 6px 0; }
.pub-date { font-family: var(--display); font-size: 1.3rem; color: var(--ink-2); }
.pub-section { max-width: 720px; width: 100%; margin: 0 auto; padding: 28px 20px; display: flex; flex-direction: column; gap: 16px; }
.pub-section h2 { text-align: center; }
.pub-fn { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pub-fn:last-child { border-bottom: 0; }
.pub-fn .day { text-align: center; }
.pub-fn .day b { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 400; line-height: 1; }
.pub-fn .day span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cover { width: 100%; max-width: 720px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); margin: 0 auto; display: block; }
.pub-foot { margin-top: auto; text-align: center; padding: 30px 20px; font-size: .8rem; color: var(--muted); }
.rsvp-ev { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }

/* ── Auth pages ─────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art {
  background: var(--ink); color: var(--bg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art::before, .auth-art::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--marigold-bright) 50%, transparent); }
.auth-art::before { width: 420px; height: 420px; right: -140px; bottom: -120px; }
.auth-art::after { width: 300px; height: 300px; right: -80px; bottom: -60px; }
.auth-art h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 14ch; position: relative; z-index: 1; }
.auth-art p { opacity: .75; max-width: 40ch; position: relative; z-index: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-form .box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px 20px; min-height: 0; } .auth-art h1 { font-size: 1.8rem; } }

/* ── Landing ─────────────────────────────── */
.landing { max-width: 1100px; margin: 0 auto; padding: 20px 20px 80px; display: flex; flex-direction: column; gap: 56px; }
.landing-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding-top: 30px; }
.landing-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
.landing-hero h1 em { font-style: normal; color: var(--rani); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.feature { background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.feature svg { width: 22px; height: 22px; color: var(--rani); }
.feature p { color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) { .landing-hero { grid-template-columns: 1fr; } .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }

.boot { min-height: 60vh; display: grid; place-items: center; }
.boot-mark { font-family: var(--display); font-size: 1.6rem; color: var(--rani); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .4; } }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; padding: 12px 20px; background: var(--danger); color: #fff; }
#blazor-error-ui .reload { color: #fff; text-decoration: underline; margin-left: 8px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Print (QR passes, guest list) ─────────────────────────────── */
@media print {
  .sidebar, .topbar, .no-print, .toasts, #blazor-error-ui { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; }
  body { background: #fff; color: #000; }
  .passes { grid-template-columns: repeat(3, 1fr); }
  .pass { border: 1px dashed #999; }
}

/* ───────── Invitation card ─────────
   Envelope (addressed on personal cards, mandala liner, wax seal) waits for a tap; the opening timeline
   is under .iv-open. Then three pages: the cover (arch, toran, Ganesh, names, date, diyas), the
   celebrations (ivory, function tiles) and family & reply (ivory, jharokha photo).
   Colours come from the theme variables below: data-theme = maroon (default), emerald, ivory. */
.iv-page {
  --iv-page-hi: #5a1424; --iv-page: #2a0710; --iv-page-lo: #17040a;
  --iv-card-hi: #8e1c39; --iv-card: #6a0f27; --iv-card-lo: #4a0818;
  --iv-gold: #e3b95f; --iv-gold-lt: #f5dc95; --iv-gold-dk: #94631a;
  --iv-cream: #f6e6c4; --iv-on-gold: #3a0612;
  --iv-env-hi: #93203f; --iv-env-mid: #74142f; --iv-env-lo: #4a0918;
  --iv-seal-hi: #d6354f; --iv-seal-lo: #8e0f26; --iv-seal-edge: #5e0818;
  --iv-panel: #fbf3e2; --iv-panel-lo: #f1dfbd; --iv-ink: #4a0a1c; --iv-accent: #8e1c39;
  --iv-foil: linear-gradient(110deg, #b98a2e 0%, #f5dc95 22%, #c99a3c 40%, #fff4cf 50%, #c99a3c 60%, #e9c873 80%, #b98a2e 100%);
  --iv-foil-dk: linear-gradient(110deg, #6f450c 0%, #b8862b 25%, #7d5011 45%, #c99a3c 60%, #6f450c 100%);
  --iv-emboss: drop-shadow(0 1px 0 rgba(0, 0, 0, .38)) drop-shadow(0 -1px 0 rgba(255, 240, 200, .14));

  position: relative; min-height: 100vh; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 74px 16px 28px;
  color: var(--iv-cream);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-variant-numeric: lining-nums;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, color-mix(in srgb, var(--iv-gold) 16%, transparent), transparent 70%),
    radial-gradient(ellipse at 50% 30%, var(--iv-page-hi) 0%, var(--iv-page) 55%, var(--iv-page-lo) 100%);
}
.iv-page[data-theme="emerald"] {
  --iv-page-hi: #13503b; --iv-page: #072a1e; --iv-page-lo: #03130d;
  --iv-card-hi: #237a5b; --iv-card: #105039; --iv-card-lo: #083223;
  --iv-cream: #f3ead0; --iv-on-gold: #0b2a1e;
  --iv-env-hi: #258562; --iv-env-mid: #145c43; --iv-env-lo: #0a3526;
  --iv-seal-hi: #d2493a; --iv-seal-lo: #8a1f14; --iv-seal-edge: #561109;
  --iv-panel: #f8f3e3; --iv-panel-lo: #ece0bd; --iv-ink: #0e3a2a; --iv-accent: #145c43;
}
.iv-page[data-theme="ivory"] {
  --iv-page-hi: #fbeaf0; --iv-page: #f1d2de; --iv-page-lo: #e2afc3;
  --iv-card-hi: #fffbf3; --iv-card: #fbf1de; --iv-card-lo: #f0dcb6;
  --iv-gold: #b8862b; --iv-gold-lt: #a8771f; --iv-gold-dk: #8a5a14;
  --iv-cream: #5c1131; --iv-on-gold: #3a0612;
  --iv-env-hi: #e0558d; --iv-env-mid: #bd2363; --iv-env-lo: #861041;
  --iv-seal-hi: #9c2246; --iv-seal-lo: #5c0a22; --iv-seal-edge: #3d0616;
  --iv-panel: #ffffff; --iv-panel-lo: #f6e8ee; --iv-ink: #5c1131; --iv-accent: #b0185a;
  --iv-foil: var(--iv-foil-dk);
  --iv-emboss: drop-shadow(0 1px 0 rgba(255, 255, 255, .7));
}
body:has(.iv-page) { background: #17040a; }
body:has(.iv-page[data-theme="emerald"]) { background: #03130d; }
body:has(.iv-page[data-theme="ivory"]) { background: #e2afc3; }
.iv-page [lang="hi"], .iv-page [lang="sa"], .iv-mantra { font-family: "Tiro Devanagari Hindi", "Nirmala UI", serif; }

/* One language at a time: English by default, Hindi when the guest flips the switch */
.iv-page:not([data-lang="hi"]) .l-hi, .iv-page[data-lang="hi"] .l-en { display: none !important; }
.iv-page .l-hi { font-size: 1.1em; letter-spacing: normal; text-transform: none; }

/* Language switch and music button, top right */
.iv-tools { position: fixed; top: 14px; right: 14px; z-index: 20; display: flex; gap: 8px; align-items: center; }
.iv-lang { display: inline-flex; padding: 3px; border-radius: 99px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(227, 185, 95, .45); backdrop-filter: blur(6px); }
.iv-lang button { border: 0; background: none; cursor: pointer; padding: 6px 13px; border-radius: 99px; font: 600 .78rem var(--body); color: rgba(246, 230, 196, .85); }
.iv-lang button[lang="hi"] { font-family: "Tiro Devanagari Hindi", serif; font-size: .92rem; padding: 3px 13px; }
.iv-page:not([data-lang="hi"]) .iv-lang [data-l="en"], .iv-page[data-lang="hi"] .iv-lang [data-l="hi"] { background: linear-gradient(110deg, #c99a3c, #f5dc95, #c99a3c); color: #3a0612; }
.iv-sound { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #f5dc95; background: rgba(0, 0, 0, .35); border: 1px solid rgba(227, 185, 95, .45); backdrop-filter: blur(6px); }
.iv-sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.iv-sound .spk { fill: currentColor; }
.iv-sound .mute, .iv-sound.off .wave { display: none; }
.iv-sound.off .mute { display: inline; }

/* ── Shared line-art colours ── */
.iv-page svg .ln { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.iv-page svg .thin { stroke-width: .7; opacity: .7; }
.iv-page svg .pt { fill: currentColor; opacity: .85; }
.iv-page svg .pt.soft { opacity: .14; }
.iv-page svg .dot { fill: currentColor; }
.iv-page svg .mg-o { fill: #f08a00; }
.iv-page svg .mg-y { fill: #ffc21a; }
.iv-page svg .mg-c { fill: #b04f00; }
.iv-page svg .leaf { fill: #3f7d2a; }
.iv-page svg .leaf-vein { fill: none; stroke: #2a5a1c; stroke-width: .8; }

/* ───────── Page 1: the cover ───────── */
.iv-sheets { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; }
.iv-card {
  position: relative; isolation: isolate;
  width: 100%; max-width: 560px; padding: 84px 44px 60px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  background: radial-gradient(ellipse at 50% 18%, var(--iv-card-hi) 0%, var(--iv-card) 45%, var(--iv-card-lo) 100%);
  border-radius: 280px 280px 22px 22px / 150px 150px 22px 22px;
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px color-mix(in srgb, var(--iv-gold) 40%, transparent);
}
.iv-card::before, .iv-card::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
.iv-card::before { inset: 12px; border: 1.5px solid color-mix(in srgb, var(--iv-gold) 85%, transparent); border-radius: 270px 270px 14px 14px / 142px 142px 14px 14px; }
.iv-card::after { inset: 20px; border: 1px solid color-mix(in srgb, var(--iv-gold) 40%, transparent); border-radius: 260px 260px 10px 10px / 134px 134px 10px 10px; }
.iv-card > * { position: relative; }
.iv-cover { opacity: 0; }
.iv-card svg { color: var(--iv-gold); }

/* Silk grain, a soft sheen and a vignette, clipped to the arch; the mandala sits inside it */
.iv-texture {
  position: absolute !important; inset: 0; z-index: -2; border-radius: inherit; overflow: hidden; pointer-events: none;
  background:
    linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .06) 46%, transparent 60%),
    radial-gradient(ellipse at 50% 42%, transparent 52%, rgba(0, 0, 0, .34) 100%),
    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 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.iv-page[data-theme="ivory"] .iv-texture { background: radial-gradient(ellipse at 50% 42%, transparent 55%, rgba(120, 60, 20, .14) 100%), 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 .4 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.iv-texture .iv-mandala { position: absolute; top: -150px; left: 50%; width: 560px; height: 560px; margin-left: -280px; color: var(--iv-gold); opacity: .085; animation: iv-spin 180s linear infinite; }

/* Marigold toran hung over the top of the arch, like over a doorway */
.iv-toran { position: absolute !important; top: -26px; left: 50%; width: min(80%, 400px); transform: translateX(-50%); z-index: 3; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.iv-toran-art { width: 100%; height: auto; display: block; color: var(--iv-gold); }

.iv-corner { position: absolute !important; width: 78px; opacity: .85; z-index: -1; }
.iv-corner.bl { left: 24px; bottom: 24px; }
.iv-corner.br { right: 24px; bottom: 24px; transform: scaleX(-1); }
.iv-corner.tl { left: 20px; top: 20px; transform: scaleY(-1); }
.iv-corner.tr { right: 20px; top: 20px; transform: scale(-1, -1); }
.iv-paisley { width: 100%; height: auto; display: block; }

.iv-ganesh { width: 112px; height: auto; display: block; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--iv-gold) 30%, transparent)); }
.iv-divider { width: 220px; height: 26px; display: block; }

/* Gold foil, pressed into the paper */
.iv-gold {
  background: var(--iv-foil); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: var(--iv-emboss);
}

/* Wording on the cover */
.iv-mantra { font-size: .92rem; line-height: 1.75; color: color-mix(in srgb, var(--iv-cream) 88%, transparent); }
.iv-shubh { font-weight: 400; line-height: 1.2; margin-top: 2px; padding: .05em .15em; }
.iv-shubh .l-en { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: clamp(2rem, 8vw, 2.5rem); }
.iv-shubh .l-hi { font-family: "Amita", "Tiro Devanagari Hindi", serif; font-weight: 700; font-size: clamp(2.6rem, 11vw, 3.4rem); }
.iv-shubh:focus, .iv-name:focus { outline: none; }
.iv-label { font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--iv-gold-lt); font-weight: 600; }
.iv-label [lang="hi"], .iv-label.l-hi { letter-spacing: .02em; font-size: 1.1rem; text-transform: none; font-weight: 400; }
.iv-greet { font-size: 1.45rem; font-style: italic; color: var(--iv-gold-lt); }
.iv-greet .l-hi { font-style: normal; }
.iv-parents { font-size: 1.3rem; font-style: italic; font-weight: 600; color: var(--iv-cream); }
.iv-line { font-size: 1.12rem; line-height: 1.6; color: color-mix(in srgb, var(--iv-cream) 92%, transparent); max-width: 430px; }
.iv-line .l-en { font-style: italic; }
.iv-couple { display: flex; flex-direction: column; align-items: center; margin: 4px 0; }
/* Gold foil is painted only inside the box, so leave room for the script swashes (the U and P loops). */
.iv-name { font-family: "Great Vibes", cursive; font-size: clamp(3.1rem, 13vw, 4.6rem); line-height: 1.15; padding: .22em .4em; margin: -.22em 0; }
.iv-page .iv-name .iv-name-dev { font-family: "Amita", "Tiro Devanagari Hindi", serif; font-weight: 700; font-size: .66em; line-height: 1.5; display: inline-block; padding: .1em 0; }
.iv-page .iv-name .iv-name-dev small { font-size: .5em; font-weight: 400; }
.iv-with { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; color: var(--iv-gold-lt); margin: -4px 0; }
.iv-with::before, .iv-with::after { content: ""; width: 48px; height: 1px; background: linear-gradient(90deg, transparent, var(--iv-gold)); }
.iv-with::after { transform: scaleX(-1); }
.iv-daughter { font-size: 1.04rem; font-style: italic; color: color-mix(in srgb, var(--iv-cream) 88%, transparent); margin-top: 4px; }
.iv-date { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; }
.iv-date .side { flex: 1; font-size: 1.04rem; letter-spacing: .2em; text-transform: uppercase; color: var(--iv-cream); font-weight: 600; }
.iv-date .side:first-child { text-align: right; }
.iv-date .side:last-child { text-align: left; }
.iv-date .ring { width: 88px; height: 88px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--iv-gold); box-shadow: 0 0 0 5px color-mix(in srgb, var(--iv-gold) 12%, transparent), inset 0 0 0 4px color-mix(in srgb, var(--iv-gold) 18%, transparent); }
.iv-date .ring b { font-size: 2.8rem; font-weight: 600; line-height: 1; }
.iv-city { font-size: 1.12rem; font-style: italic; letter-spacing: .06em; color: color-mix(in srgb, var(--iv-cream) 90%, transparent); }

/* Diyas with flickering flames */
.iv-diyas { display: flex; justify-content: center; gap: 120px; margin-top: 4px; }
.iv-diya { width: 42px; height: auto; display: block; color: var(--iv-gold); overflow: visible; }
.iv-diya .bowl { fill: #c58f2c; }
.iv-diya .fl-o { fill: #ff9f1c; }
.iv-diya .fl-i { fill: #fff2b0; }
.iv-diya .flame { transform-box: fill-box; transform-origin: 50% 100%; filter: drop-shadow(0 0 6px rgba(255, 170, 60, .85)); animation: iv-flicker 1.4s ease-in-out infinite alternate; }

/* ───────── Pages 2 and 3: ivory panels ───────── */
.iv-knot-wrap { height: 44px; color: var(--iv-gold); margin: -2px 0; }
.iv-knot { width: 60px; height: 44px; display: block; }
.iv-panel {
  position: relative; isolation: isolate; width: 100%; max-width: 560px;
  padding: 48px 34px 42px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  color: var(--iv-ink); border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 30%, var(--iv-panel) 55%, var(--iv-panel-lo) 100%),
    var(--iv-panel);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .6);
}
.iv-panel::before, .iv-panel::after { content: ""; position: absolute; pointer-events: none; z-index: -1; border-radius: 12px; }
.iv-panel::before { inset: 10px; border: 1.5px solid color-mix(in srgb, var(--iv-gold-dk) 75%, transparent); }
.iv-panel::after { inset: 16px; border: 1px solid color-mix(in srgb, var(--iv-gold-dk) 35%, transparent); border-radius: 8px; }
.iv-panel > * { position: relative; }
.iv-panel svg { color: var(--iv-gold-dk); }
.iv-panel .iv-corner { width: 62px; opacity: .7; }
.iv-panel .iv-label { color: var(--iv-gold-dk); }
.iv-panel .iv-venue { color: var(--iv-ink); }
.iv-panel .iv-small, .iv-panel .iv-family p:not(.iv-label), .iv-panel .iv-rsvp { color: color-mix(in srgb, var(--iv-ink) 88%, transparent); }
.iv-panel .iv-close { color: var(--iv-accent); }
.iv-panel .iv-tag { color: var(--iv-gold-dk); }
.iv-panel .iv-map, .iv-panel .iv-btn:not(.primary) { color: var(--iv-gold-dk); border-color: color-mix(in srgb, var(--iv-gold-dk) 60%, transparent); background: rgba(255, 255, 255, .4); }

.iv-venue { font-size: 1.55rem; font-weight: 600; color: var(--iv-cream); }
.iv-small { font-size: 1.05rem; color: color-mix(in srgb, var(--iv-cream) 88%, transparent); }
.iv-map { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 6px 16px; border: 1px solid color-mix(in srgb, var(--iv-gold) 55%, transparent); border-radius: 99px; font-family: var(--body); font-size: .8rem; color: var(--iv-gold-lt); text-decoration: none; }
.iv-map svg { width: 14px; height: 14px; }

/* Celebration tiles with gold icons */
.iv-tiles { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.iv-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 10px 12px;
  border-radius: 14px; border: 1px solid color-mix(in srgb, var(--iv-gold-dk) 40%, transparent);
  background: linear-gradient(180deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, .25));
}
.iv-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.iv-fn-icon { width: 38px; height: 38px; color: var(--iv-gold-dk); margin-bottom: 2px; }
.iv-fn-icon .ln { stroke-width: 1.3; }
.iv-tile .fn { font-size: 1.22rem; font-weight: 600; color: var(--iv-ink); }
.iv-tile .when { font-size: .98rem; color: color-mix(in srgb, var(--iv-ink) 85%, transparent); }
.iv-tile .where { display: inline-flex; gap: 4px; align-items: center; font-size: .9rem; font-style: italic; color: color-mix(in srgb, var(--iv-ink) 72%, transparent); }
.iv-tile .where a { color: var(--iv-gold-dk); display: inline-flex; }
.iv-tile .where svg { width: 14px; height: 14px; }

/* Couple photo in an arch window (jharokha) */
.iv-jharokha { position: relative; margin: 10px 0 6px; width: 196px; height: 250px; padding: 6px; border-radius: 98px 98px 12px 12px; border: 1.5px solid var(--iv-gold-dk); box-shadow: 0 0 0 5px color-mix(in srgb, var(--iv-gold) 16%, transparent), 0 20px 40px -18px rgba(0, 0, 0, .55); background: var(--iv-panel); }
.iv-jharokha::before { content: ""; position: absolute; top: -15px; left: 50%; width: 22px; height: 15px; margin-left: -11px; border-radius: 11px 11px 0 0; background: var(--iv-gold-dk); }
.iv-jharokha::after { content: ""; position: absolute; top: -22px; left: 50%; width: 6px; height: 8px; margin-left: -3px; border-radius: 3px 3px 0 0; background: var(--iv-gold-dk); }
.iv-jharokha img { width: 100%; height: 100%; object-fit: cover; border-radius: 92px 92px 8px 8px; display: block; }

.iv-family { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 28px; width: 100%; max-width: 440px; padding-top: 6px; }
.iv-family p:not(.iv-label) { font-size: 1.06rem; line-height: 1.5; }
.iv-family .iv-label { margin-bottom: 4px; font-size: 1.05rem; letter-spacing: .02em; }
.iv-rsvp { font-size: 1.06rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; justify-content: center; }
.iv-close { margin-top: 8px; font-size: 1.2rem; font-style: italic; color: var(--iv-gold-lt); }
.iv-close .l-hi { font-style: normal; }
.iv-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.iv-actions:not(:has(*)) { display: none; }
.iv-btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 99px; font: 600 .84rem var(--body); color: var(--iv-gold-lt); border: 1px solid color-mix(in srgb, var(--iv-gold) 60%, transparent); background: rgba(0, 0, 0, .12); text-decoration: none; }
.iv-btn svg { width: 15px; height: 15px; }
.iv-btn.primary { color: #3a0612; border-color: transparent; background: linear-gradient(110deg, #c99a3c, #f5dc95, #c99a3c); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); }
.iv-btn .l-hi { font-family: "Tiro Devanagari Hindi", serif; font-weight: 400; }
.iv-count { font-family: var(--body); font-size: .76rem; font-weight: 700; letter-spacing: .06em; color: #3a0612; padding: 5px 14px; border-radius: 99px; background: linear-gradient(110deg, #c99a3c, #f5dc95, #c99a3c); }
.iv-tag { font-style: italic; font-size: 1.08rem; color: var(--iv-gold-lt); }

/* Our story (under the card on /w/{slug}) */
.iv-extra { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.iv-story { width: 100%; padding: 28px 30px; text-align: center; border-radius: 16px; background: var(--iv-panel); color: var(--iv-ink); display: flex; flex-direction: column; gap: 10px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--iv-gold-dk) 55%, transparent); }
.iv-story .iv-label { color: var(--iv-gold-dk); }
.iv-story-text { font-size: 1.14rem; line-height: 1.7; white-space: pre-line; }

.iv-foot { position: relative; z-index: 6; }
.iv-login { font-family: var(--body); font-size: .8rem; color: rgba(246, 230, 196, .8); padding: 6px 16px; border: 1px solid rgba(227, 185, 95, .45); border-radius: 99px; background: rgba(0, 0, 0, .22); text-decoration: none; }
.iv-page[data-theme="ivory"] .iv-login { color: #5c1131; background: rgba(255, 255, 255, .5); }

/* Wide screens: hanging marigold strings and diyas at the sides */
.iv-side { display: none; }
@media (min-width: 1100px) {
  .iv-side { display: flex; gap: 22px; position: fixed; top: 0; z-index: 1; pointer-events: none; }
  .iv-side.left { left: max(16px, calc(50% - 560px)); }
  .iv-side.right { right: max(16px, calc(50% - 560px)); }
  .iv-latkan-art { width: 40px; height: auto; display: block; color: var(--iv-gold); transform-origin: 50% 0; animation: iv-sway 6s ease-in-out infinite alternate; }
  .iv-latkan-art:nth-child(2) { animation-duration: 7.5s; animation-delay: -2s; }
  .iv-latkan-art:nth-child(3) { animation-duration: 5.5s; animation-delay: -4s; }
  .iv-side-diya { position: fixed; bottom: 26px; }
  .iv-side.left .iv-side-diya { left: max(40px, calc(50% - 520px)); }
  .iv-side.right .iv-side-diya { right: max(40px, calc(50% - 520px)); }
  .iv-side-diya .iv-diya { width: 56px; }
}

/* ───────── Envelope ───────── */
.iv-envelope {
  position: fixed; left: 50%; top: 50%; z-index: 10; cursor: pointer;
  border: 0; padding: 0; background: none; color: inherit; font: inherit;
  width: min(420px, 86vw); aspect-ratio: 3 / 2; perspective: 1400px;
  transform: translate(-50%, -50%);
  animation: iv-env-in .7s ease-out both;
}
.iv-envelope > div { position: absolute; inset: 0; }
.iv-env-back { background: linear-gradient(var(--iv-env-lo), color-mix(in srgb, var(--iv-env-lo) 80%, black)); border-radius: 10px; border: 1px solid color-mix(in srgb, var(--iv-gold) 50%, transparent); box-shadow: 0 34px 70px -24px rgba(0, 0, 0, .85); }
.iv-env-letter {
  inset: 8% 7% 8% 7% !important; z-index: 1; border-radius: 4px;
  background: linear-gradient(#fbf0d8, #efdcb4); color: #b8862b;
  display: flex; justify-content: center; align-items: flex-start; padding-top: 8%;
}
.iv-env-letter .iv-divider { width: 60%; height: auto; }
.iv-env-pocket { z-index: 4; }
.iv-pocket-art, .iv-flap-art { width: 100%; height: 100%; display: block; }
.iv-envelope .env-hi { stop-color: var(--iv-env-hi); }
.iv-envelope .env-mid { stop-color: var(--iv-env-mid); }
.iv-envelope .env-lo { stop-color: var(--iv-env-lo); }
.iv-envelope .foil { fill: none; stroke: var(--iv-gold); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.iv-envelope .foil.thin { stroke-width: .8; opacity: .6; }

/* Addressed like a real envelope */
.iv-env-address {
  inset: auto 6% 7% 6% !important; z-index: 5; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 8px;
  color: color-mix(in srgb, #f6e6c4 85%, transparent); text-align: center; pointer-events: none;
}
.iv-env-address .to, .iv-env-address .fam { font-style: italic; font-size: .98rem; }
.iv-env-address .who { font-family: "Great Vibes", cursive; font-size: 1.75rem; line-height: 1.1; padding: 0 .2em; background: linear-gradient(110deg, #b98a2e, #f5dc95 40%, #c99a3c 60%, #e9c873); -webkit-background-clip: text; background-clip: text; color: transparent; }
.iv-env-address .who .l-hi, .iv-env-address .who[lang="hi"] { font-family: "Amita", serif; font-size: .8em; }

/* The flap is two-sided: gold-edged outside, mandala liner inside */
.iv-env-flap { z-index: 6; transform-origin: top; transform-style: preserve-3d; }
.iv-env-flap .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.iv-env-flap .liner {
  transform: rotateY(180deg); clip-path: polygon(0 0, 100% 0, 50% 60%); overflow: hidden;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--iv-gold) 55%, transparent) 0 1.2px, transparent 1.6px) 0 0 / 14px 14px,
    radial-gradient(circle, color-mix(in srgb, var(--iv-gold) 22%, transparent) 0 4px, transparent 4.5px) 7px 7px / 14px 14px,
    var(--iv-env-lo);
}
.iv-env-flap .liner .iv-mandala { position: absolute; width: 64%; left: 18%; top: -26%; color: var(--iv-gold); opacity: .55; }

.iv-seal {
  inset: auto !important; left: 50% !important; top: 60% !important; z-index: 7; width: 66px; height: 66px;
  transform: translate(-50%, -50%); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
  animation: iv-seal-glow 2.4s ease-in-out .8s infinite;
}
.iv-seal-art { width: 100%; height: 100%; display: block; }
.iv-envelope .seal-hi { stop-color: var(--iv-seal-hi); }
.iv-envelope .seal-lo { stop-color: var(--iv-seal-lo); }
.iv-envelope .seal-edge { stop-color: var(--iv-seal-edge); }
.iv-envelope .seal-ring { fill: none; stroke: rgba(0, 0, 0, .28); stroke-width: 1.6; }
.iv-envelope .seal-ring.hi { stroke: rgba(255, 220, 170, .22); stroke-width: 1; }
.iv-envelope .seal-text { font-family: "Great Vibes", "Amita", cursive; font-size: 27px; fill: #f3d38a; }
.iv-env-hint { top: auto !important; bottom: -46px !important; text-align: center; font-family: var(--body); font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(246, 230, 196, .75); animation: iv-hint 2.4s ease-in-out infinite; }
.iv-page[data-theme="ivory"] .iv-env-hint { color: #5c1131; }
.iv-envelope:focus-visible .iv-seal { outline: 2px solid var(--iv-gold-lt); outline-offset: 4px; border-radius: 50%; }

/* Petals: marigold and rose, fluttering as they fall */
.iv-petals { position: fixed; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; perspective: 600px; }
.iv-petal { position: absolute; top: -6vh; left: var(--x); width: 13px; height: 17px; opacity: 0; }
.iv-petal.p0 { background: radial-gradient(circle at 40% 30%, #ffc266, #f07b0a); border-radius: 50% 50% 50% 12%; }
.iv-petal.p1 { background: radial-gradient(circle at 40% 30%, #ffe680, #f2b705); border-radius: 50% 50% 50% 12%; }
.iv-petal.p2 { background: linear-gradient(135deg, #f06292, #b0185a); border-radius: 0 85% 0 85%; }
.iv-petal.p3 { background: linear-gradient(135deg, #e53950, #8e0f26); border-radius: 0 85% 0 85%; }

/* Sealed until tapped: no scrolling behind the envelope; hidden content cannot be tabbed to */
.iv-page:not(.iv-open) { height: 100vh; overflow: hidden; }
.iv-page:not(.iv-open) .iv-sheets, .iv-page:not(.iv-open) .iv-extra, .iv-page:not(.iv-open) .iv-foot { visibility: hidden; }
.iv-foot { opacity: 0; }

/* After the tap: seal breaks (0s) → flap opens (.35s) → letter rises (.95s) → envelope drops away (1.5s)
   → cover rises (1.6s) → lines fade in one by one (2.1s+) → petals; pages 2 and 3 fade in when scrolled to. */
.iv-open .iv-envelope { pointer-events: none; animation: iv-env-in .7s ease-out both, iv-env-out .6s ease-in 1.5s forwards; }
.iv-open .iv-seal { animation: iv-seal .4s ease-in .05s both; }
.iv-open .iv-env-hint, .iv-open .iv-env-address { animation: iv-fade-out .3s ease-in .2s both; }
.iv-open .iv-env-flap { animation: iv-flap .75s ease-in-out .35s both; }
.iv-open .iv-env-letter { animation: iv-letter .6s ease-out .95s both; }
.iv-open .iv-cover { animation: iv-card-in .9s cubic-bezier(.2, .8, .2, 1) 1.6s both; }
.iv-open .iv-cover .iv-toran { animation: iv-toran 1s cubic-bezier(.2, .8, .2, 1) 2s both; }
.iv-open .iv-in { animation: iv-rise .7s ease-out both; animation-delay: calc(2.1s + var(--i, 0) * 70ms); }
.iv-open .iv-gold.iv-in { animation: iv-rise .7s ease-out both, iv-shimmer 2.6s ease-in-out 1 both; animation-delay: calc(2.1s + var(--i, 0) * 70ms), calc(2.7s + var(--i, 0) * 70ms); }
.iv-open .iv-foot { animation: iv-rise .7s ease-out 2.6s both; }
.iv-open .iv-petal { animation: iv-fall var(--t) linear calc(var(--d) - 1s) 2 both; }
.iv-reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.iv-open .iv-reveal:not(.seen) { opacity: 0; transform: translateY(28px); }

/* A second tap: jump to the opened card */
.iv-skip .iv-envelope { display: none; }
.iv-skip .iv-cover, .iv-skip .iv-cover .iv-toran, .iv-skip .iv-in, .iv-skip .iv-foot { animation-delay: -20s !important; }

@keyframes iv-env-in { from { opacity: 0; transform: translate(-50%, -44%) scale(.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes iv-env-out { to { opacity: 0; visibility: hidden; transform: translate(-50%, 6%) scale(.9); } }
@keyframes iv-seal { to { opacity: 0; transform: translate(-50%, -50%) scale(1.35) rotate(-12deg); } }
@keyframes iv-flap { to { transform: rotateX(180deg); z-index: 0; } }
@keyframes iv-letter { to { transform: translateY(-36%); } }
@keyframes iv-fade-out { to { opacity: 0; } }
@keyframes iv-hint { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }
@keyframes iv-seal-glow {
  0%, 100% { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)) drop-shadow(0 0 0 rgba(245, 220, 149, 0)); }
  50% { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)) drop-shadow(0 0 14px rgba(245, 220, 149, .6)); }
}
@keyframes iv-card-in { from { opacity: 0; transform: translateY(70px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes iv-toran { from { opacity: 0; transform: translateX(-50%) translateY(-24px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes iv-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes iv-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes iv-spin { to { transform: rotate(360deg); } }
@keyframes iv-sway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
@keyframes iv-flicker {
  0% { transform: scale(1, 1) skewX(0deg); opacity: 1; }
  35% { transform: scale(.94, 1.06) skewX(2deg); opacity: .92; }
  70% { transform: scale(1.03, .96) skewX(-2deg); opacity: 1; }
  100% { transform: scale(.97, 1.08) skewX(1deg); opacity: .95; }
}
@keyframes iv-fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(var(--s)); }
  10% { opacity: .95; }
  50% { transform: translate3d(var(--sway), 55vh, 0) rotateX(calc(var(--spin) * .5)) rotateY(calc(var(--spin) * .8)) rotateZ(120deg) scale(var(--s)); }
  100% { opacity: .85; transform: translate3d(calc(var(--sway) * -1), 112vh, 0) rotateX(var(--spin)) rotateY(calc(var(--spin) * 1.4)) rotateZ(260deg) scale(var(--s)); }
}

@media (max-width: 480px) {
  .iv-page { padding-top: 70px; }
  .iv-card { padding: 76px 22px 54px; gap: 10px; }
  .iv-card::before { inset: 9px; }
  .iv-card::after { inset: 15px; }
  .iv-corner { width: 56px; }
  .iv-corner.bl { left: 16px; bottom: 16px; }
  .iv-corner.br { right: 16px; bottom: 16px; }
  .iv-panel { padding: 42px 20px 36px; }
  .iv-panel .iv-corner { width: 46px; }
  .iv-panel .iv-corner.tl, .iv-panel .iv-corner.bl { left: 14px; }
  .iv-panel .iv-corner.tr, .iv-panel .iv-corner.br { right: 14px; }
  .iv-panel .iv-corner.tl, .iv-panel .iv-corner.tr { top: 14px; }
  .iv-panel .iv-corner.bl, .iv-panel .iv-corner.br { bottom: 14px; }
  .iv-ganesh { width: 96px; }
  .iv-date { gap: 12px; }
  .iv-date .side { font-size: .88rem; letter-spacing: .12em; }
  .iv-date .ring { width: 74px; height: 74px; }
  .iv-date .ring b { font-size: 2.3rem; }
  .iv-diyas { gap: 80px; }
  .iv-jharokha { width: 168px; height: 214px; }
  .iv-tools { top: 10px; right: 10px; }
}
@media (max-width: 360px) { .iv-tiles { grid-template-columns: 1fr; } .iv-tile:last-child:nth-child(odd) { grid-column: auto; } }

@media (prefers-reduced-motion: reduce) {
  .iv-envelope, .iv-petals { display: none; }
  .iv-page:not(.iv-open) { height: auto; overflow: visible; }
  .iv-page .iv-sheets, .iv-page .iv-cover, .iv-page .iv-foot, .iv-page .iv-extra { opacity: 1; visibility: visible; }
  .iv-reveal, .iv-open .iv-reveal:not(.seen) { opacity: 1; transform: none; transition: none; }
  .iv-cover, .iv-in, .iv-gold.iv-in, .iv-foot, .iv-mandala, .iv-latkan-art, .iv-diya .flame, .iv-toran,
  .iv-open .iv-cover, .iv-open .iv-in, .iv-open .iv-gold.iv-in, .iv-open .iv-foot, .iv-open .iv-cover .iv-toran { animation: none; }
}

/* ───────── Phones ───────── */

/* The page heading gets focus after each navigation (for screen readers); no box around it. */
h1:focus { outline: none; }

@media (max-width: 760px) {
  /* 16px text in form fields stops iPhones zooming in when a field is tapped. */
  .input, .select, .textarea, .input.sm, .select.sm { font-size: 16px; }
  .btn.sm { min-height: 38px; padding: 8px 12px; }
  .icon-btn { width: 40px; height: 40px; }
  .ev-dot { min-width: 34px; height: 32px; font-size: .78rem; }
  .ev-dots { gap: 6px; }
  .tick { width: 24px; height: 24px; }
  .iv-lang button { padding: 9px 15px; }
  .iv-lang button[lang="hi"] { padding: 6px 15px; }
  .iv-map, .iv-login { padding: 9px 18px; }
}

/* Bigger touch area for small controls without changing how they look. */
@media (pointer: coarse) {
  .tick, .link-btn, .switch, a.small, .iv-fn-venue a { position: relative; }
  .tick::after, .link-btn::after, .switch::before, a.small::after, .iv-fn-venue a::after { content: ""; position: absolute; inset: -10px; }
}

/* Wide tables become one card per row on phones. Add class "stack-sm" to the table; app.js copies each
   column heading onto its cells (data-label). Mark the main cell "lead" and hide-only cells "hide-sm". */
@media (max-width: 640px) {
  .table-wrap:has(> table.stack-sm) { border: 0; background: none; overflow: visible; border-radius: 0; }
  table.t.stack-sm, table.t.stack-sm tbody, table.t.stack-sm tfoot { display: block; }
  table.t.stack-sm thead { display: none; }
  table.t.stack-sm tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px;
    padding: 14px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  }
  table.t.stack-sm tbody tr:hover td { background: none; }
  table.t.stack-sm td { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 0; border: 0; text-align: left; }
  table.t.stack-sm td::before { content: attr(data-label); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  table.t.stack-sm td:not([data-label])::before, table.t.stack-sm td[data-label=""]::before { content: none; }
  table.t.stack-sm.cols-3 tr { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  table.t.stack-sm td.lead { grid-column: 1 / -1; order: -1; font-size: 1rem; }
  table.t.stack-sm td.lead::before { content: none; }
  table.t.stack-sm td.actions-cell { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
  table.t.stack-sm td.actions-cell:not(:has(*)) { display: none; }
  table.t.stack-sm .hide-sm { display: none; }
  table.t.stack-sm tfoot tr { background: var(--sunk); }
  table.t.stack-sm tfoot td { background: none; border: 0; }
  table.t.stack-sm .select.sm { width: 100% !important; min-width: 0 !important; }
  .card.flush .table-wrap:has(> table.stack-sm) { padding: 12px 12px 2px; }
}

/* ───────── Shell extras: language / text size, bottom tab bar ───────── */
.prefs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 4px 10px; }
.prefs .seg a { font-size: .84rem; padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.prefs .seg a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.big-text-btn[aria-pressed="true"] { background: var(--rani-soft); color: var(--rani); }

/* Larger text for elders: everything sized in rem grows with it. */
html.big-text { font-size: 112.5%; }
html.big-text body { font-size: 17px; }

.tabbar { display: none; }
@media (max-width: 960px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tab-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px;
    border: 0; background: none; font: inherit; font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; cursor: pointer; border-radius: 10px;
  }
  .tab-item svg { width: 22px; height: 22px; }
  .tab-item.active { color: var(--rani); }
  .tab-item.active svg { color: var(--rani); }
  .page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media print { .tabbar, .prefs { display: none !important; } }

/* ───────── Toast with an action (Undo) ───────── */
.toast { display: flex; align-items: center; gap: 14px; }
.toast-action { border: 0; background: none; font: inherit; font-weight: 700; color: var(--marigold-bright); cursor: pointer; padding: 6px 4px; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }

/* ───────── Home: getting started ───────── */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps a { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; flex: 1; }
.steps a span { font-size: .84rem; color: var(--muted); }
.steps li.done b { color: var(--muted); text-decoration: line-through; }
.steps .tick { margin-top: 2px; pointer-events: none; }

/* ───────── Vidai handover ───────── */
.vidai-pick { width: 100%; text-align: left; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; }
.vidai-pick:hover { background: var(--sunk); }
.vidai-card { border: 2px solid var(--marigold-bright); }
.vidai-card.done { border-color: var(--mehendi); }
.vidai-name { font-size: clamp(1.6rem, 6vw, 2.1rem); }
.vidai-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vidai-items li { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--sunk); font-size: 1.15rem; }
.vidai-items li b { font-size: 1.6rem; min-width: 2.2ch; color: var(--rani); }
.vidai-items li.lifafa { background: var(--marigold-soft); }
.vidai-items li.lifafa b { color: var(--marigold); min-width: auto; }
.vidai-go { min-height: 56px; font-size: 1.1rem; }

/* ───────── Packing labels ───────── */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.label-slip { border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); break-inside: avoid; }
.label-slip .who { font-size: 1.1rem; }
.label-slip ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
@media print {
  .labels { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .label-slip { border-color: #888; padding: 8px 10px; }
  .page-head { display: none; }
}

/* ───────── Guest reply page (same look as the card) ───────── */
.rsvp-page { padding-top: 64px; }
.rsvp-page .iv-card { opacity: 1; animation: none; visibility: visible; padding: 40px 28px 34px; border-radius: 22px; }
.rsvp-page .iv-card::before { border-radius: 14px; }
.rsvp-page .iv-card::after { border-radius: 10px; }
.rsvp-page .boot { min-height: 60vh; }
.rsvp-names { font-family: "Great Vibes", cursive; font-weight: 400; font-size: clamp(2.4rem, 10vw, 3.4rem); line-height: 1.2; padding: .15em .35em; margin: -.15em 0; }
.iv-with-inline { font-family: "Cormorant Garamond", serif; font-size: .5em; vertical-align: middle; }
.rsvp-note { width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(120, 170, 70, .18); border: 1px solid rgba(120, 170, 70, .55); color: var(--iv-cream); font-size: 1.02rem; }
.rsvp-list { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.rsvp-fn { padding: 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--iv-gold) 35%, transparent); background: rgba(0, 0, 0, .12); display: flex; flex-direction: column; gap: 10px; }
.rsvp-fn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rsvp-fn h2 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.35rem; color: var(--iv-cream); }
.rsvp-status { font-family: var(--body); font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; background: rgba(255, 255, 255, .08); color: var(--iv-gold-lt); }
.rsvp-status.s1 { background: rgba(166, 196, 108, .25); color: #d8efb0; }
.rsvp-status.s2 { background: rgba(255, 255, 255, .06); color: color-mix(in srgb, var(--iv-cream) 69%, transparent); }
.rsvp-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rsvp-choices button { min-height: 46px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--iv-gold) 45%, transparent); background: none; color: var(--iv-cream); font: 600 .9rem var(--body); cursor: pointer; }
.rsvp-choices button.on { background: linear-gradient(110deg, #c99a3c, #f5dc95, #c99a3c); color: #3a0612; border-color: transparent; }
.rsvp-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--iv-cream); font-family: var(--body); font-size: .9rem; }
.rsvp-count .input { width: 96px; text-align: center; font-size: 1.1rem; }
.rsvp-send { width: 100%; justify-content: center; min-height: 52px; font-size: 1rem; margin-top: 4px; }
.rsvp-send[disabled] { opacity: .6; }
.rsvp-pass .rsvp-qr { background: #fff; padding: 12px; border-radius: 14px; }
.rsvp-pass .rsvp-qr img { width: 210px; height: 210px; display: block; }
.rsvp-foot { font-family: var(--body); font-size: .8rem; color: color-mix(in srgb, var(--iv-cream) 69%, transparent); text-align: center; }
.rsvp-page .rsvp-choices .l-hi, .rsvp-page .rsvp-send .l-hi { font-family: "Tiro Devanagari Hindi", serif; font-weight: 400; }

/* Invitation card page: colour theme swatches */
.theme-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-swatch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: .84rem; cursor: pointer; color: var(--ink); }
.theme-swatch.on { border-color: var(--rani); box-shadow: 0 0 0 3px var(--rani-soft); font-weight: 600; }
.theme-swatch .chip-c { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #e3b95f; }
.theme-swatch.t-maroon .chip-c { background: radial-gradient(circle at 35% 30%, #8e1c39, #4a0818); }
.theme-swatch.t-emerald .chip-c { background: radial-gradient(circle at 35% 30%, #237a5b, #083223); }
.theme-swatch.t-ivory .chip-c { background: radial-gradient(circle at 35% 30%, #fffbf3, #f0dcb6); border-color: #e0558d; }

/* ───────── Product page (home) ───────── */
.mk { --mk-max: 1140px; display: flex; flex-direction: column; overflow-x: hidden; }
.mk a { text-decoration: none; }
.mk .eyebrow { display: inline-block; margin-bottom: 10px; }
.mk-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 14px max(16px, calc((100% - var(--mk-max)) / 2)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.mk-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-size: 1.25rem; }
.mk-brand small { display: block; font-family: var(--body); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.mk-brand.small { font-size: 1rem; }
.mk-links { display: flex; gap: 22px; margin-left: auto; }
.mk-links a { color: var(--ink-2); font-size: .92rem; font-weight: 500; }
.mk-links a:hover { color: var(--rani); }
.mk-nav-actions { display: flex; gap: 8px; }
.mk-big { padding: 13px 22px; font-size: 1rem; border-radius: 12px; }

.mk-hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; padding: 64px max(16px, calc((100% - var(--mk-max)) / 2)) 72px; position: relative; }
.mk-hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--rani) 14%, transparent), transparent 65%); z-index: -1; }
.mk-hero h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); line-height: 1.06; letter-spacing: -.01em; }
.mk-hero h1 em { font-style: normal; color: var(--rani); }
.mk-lead { margin-top: 18px; font-size: 1.12rem; line-height: 1.6; color: var(--ink-2); max-width: 54ch; }
.mk-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.mk-cta.center { justify-content: center; }
.mk-trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .9rem; }
.mk-trust li { display: inline-flex; align-items: center; gap: 6px; }
.mk-trust svg { width: 16px; height: 16px; color: var(--mehendi); }

/* Phone with a sample invitation */
.mk-phone-wrap { position: relative; display: flex; justify-content: center; }
.mk-phone { width: 290px; aspect-ratio: 9 / 18.5; border-radius: 44px; padding: 12px; background: #1b1016; box-shadow: 0 50px 90px -30px rgba(60, 10, 30, .55), inset 0 0 0 2px #3b2a33; transform: rotate(3deg); animation: mk-float 7s ease-in-out infinite; }
.mk-screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: radial-gradient(ellipse at 50% 0%, #5a1424, #2a0710 60%, #17040a); display: flex; align-items: flex-end; justify-content: center; padding: 34px 14px 0; }
.mk-mini-card {
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 44px 12px 10px; text-align: center;
  color: #f6e6c4; font-family: "Cormorant Garamond", Georgia, serif; font-variant-numeric: lining-nums;
  background: radial-gradient(ellipse at 50% 18%, #8e1c39, #6a0f27 45%, #4a0818);
  border-radius: 130px 130px 0 0 / 70px 70px 0 0; box-shadow: inset 0 0 0 6px #6a0f27, inset 0 0 0 7.5px #e3b95f;
}
.mk-mini-card svg { color: #e3b95f; }
.mk-mini-card svg .ln { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.mk-mini-card svg .thin { stroke-width: .7; opacity: .7; }
.mk-mini-card svg .pt { fill: currentColor; opacity: .85; }
.mk-mini-card svg .pt.soft { opacity: .14; }
.mk-mini-card svg .dot { fill: currentColor; }
.mk svg .mg-o { fill: #f08a00; }
.mk svg .mg-y { fill: #ffc21a; }
.mk svg .mg-c { fill: #b04f00; }
.mk svg .leaf { fill: #3f7d2a; }
.mk svg .leaf-vein { fill: none; stroke: #2a5a1c; stroke-width: .8; }
.mk-mini-toran { position: absolute; top: -12px; left: 12%; width: 76%; }
.mk-mini-toran svg, .mk-final-art svg { width: 100%; height: auto; display: block; color: #e3b95f; }
.mk-mini-toran svg .ln, .mk-final-art svg .ln { fill: none; stroke: currentColor; stroke-width: 1.2; }
.mk-mini-toran svg .thin, .mk-final-art svg .thin { stroke-width: .7; opacity: .7; }
.mk-mini-ganesh svg { width: 46px; height: auto; display: block; }
.mk-mini-shubh { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .95rem; background: linear-gradient(110deg, #b98a2e, #f5dc95 40%, #c99a3c 60%, #e9c873); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-mini-div svg { width: 120px; height: 14px; display: block; }
.mk-mini-label { font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: #f5dc95; }
.mk-mini-name { font-family: "Great Vibes", cursive; font-size: 2.1rem; line-height: 1.1; padding: .1em .3em; background: linear-gradient(110deg, #b98a2e, #f5dc95 40%, #c99a3c 60%, #e9c873); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-mini-amp { color: #f5dc95; font-size: .85rem; margin: -6px 0; }
.mk-mini-date { display: flex; align-items: center; gap: 8px; font-size: .55rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.mk-mini-date b { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e3b95f; display: grid; place-items: center; font-size: 1.1rem; color: #f5dc95; }
.mk-mini-diyas { display: flex; gap: 60px; margin-top: auto; }
.mk-mini-diyas svg { width: 24px; height: auto; overflow: visible; }
.mk-mini-diyas .bowl { fill: #c58f2c; }
.mk-mini-diyas .fl-o { fill: #ff9f1c; }
.mk-mini-diyas .fl-i { fill: #fff2b0; }
.mk-mini-diyas .ln { fill: none; stroke: #e3b95f; stroke-width: 1.2; }
.mk-mini-diyas .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: iv-flicker 1.4s ease-in-out infinite alternate; }
.mk-float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .84rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.mk-float svg { width: 16px; height: 16px; color: var(--mehendi); }
.mk-float-1 { top: 18%; left: -6%; animation: mk-float 6s ease-in-out infinite reverse; }
.mk-float-1 svg { color: var(--rani); }
.mk-float-2 { bottom: 14%; right: -4%; animation: mk-float 8s ease-in-out infinite; }

/* Sections */
.mk-section { padding: 72px max(16px, calc((100% - var(--mk-max)) / 2)); }
.mk-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.mk-head h2, .mk-family h2, .mk-final h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; }
.mk-head p { margin-top: 12px; color: var(--ink-2); font-size: 1.05rem; line-height: 1.6; }
.mk-cards { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--rani-soft) 55%, transparent)); }
.mk-steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mk-step3 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.mk-step3 h3 { font-size: 1.1rem; }
.mk-step3 p { color: var(--muted); font-size: .94rem; line-height: 1.55; }

.mk-env { position: relative; height: 150px; border-radius: 12px; overflow: hidden; background: linear-gradient(165deg, #82173a, #4a0918); margin-bottom: 8px; }
.mk-env-flap { position: absolute; inset: 0; background: linear-gradient(#93203f, #6c1129); clip-path: polygon(0 0, 100% 0, 50% 58%); }
.mk-env-flap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#e3b95f, #e3b95f); clip-path: polygon(0 0, 2% 0, 50% 55%, 98% 0, 100% 0, 50% 58%); }
.mk-env-seal { position: absolute; left: 50%; top: 58%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #d6354f, #8e0f26 70%); color: #f3d38a; font-family: "Great Vibes", cursive; font-size: 1.05rem; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
.mk-env-to { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #f6e6c4; font-family: "Cormorant Garamond", serif; font-style: italic; font-size: .85rem; }
.mk-env-to span { font-family: "Great Vibes", cursive; font-style: normal; font-size: 1.35rem; color: #f5dc95; }
.mk-pages { position: relative; height: 150px; margin-bottom: 8px; border-radius: 12px; background: var(--sunk); display: flex; justify-content: center; align-items: center; }
.mk-pages span { position: absolute; width: 74px; height: 116px; border-radius: 10px; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45); }
.mk-pages .p1 { background: radial-gradient(ellipse at 50% 18%, #8e1c39, #4a0818); border-radius: 37px 37px 8px 8px / 22px 22px 8px 8px; box-shadow: inset 0 0 0 4px #6a0f27, inset 0 0 0 5px #e3b95f, 0 10px 22px -10px rgba(0, 0, 0, .45); transform: translateX(-62px) rotate(-8deg); }
.mk-pages .p2 { background: #fbf3e2; box-shadow: inset 0 0 0 4px #fbf3e2, inset 0 0 0 5px #b8862b, 0 10px 22px -10px rgba(0, 0, 0, .45); z-index: 1; }
.mk-pages .p3 { background: #fbf3e2; box-shadow: inset 0 0 0 4px #fbf3e2, inset 0 0 0 5px #b8862b, 0 10px 22px -10px rgba(0, 0, 0, .45); transform: translateX(62px) rotate(8deg); }
.mk-swatches { height: 150px; margin-bottom: 8px; border-radius: 12px; background: var(--sunk); display: flex; align-items: center; justify-content: center; gap: 14px; }
.mk-swatches span, .mk-swatches a { width: 58px; height: 86px; border-radius: 29px 29px 8px 8px / 18px 18px 8px 8px; box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .12), inset 0 0 0 5px #e3b95f, 0 10px 20px -10px rgba(0, 0, 0, .45); }
.mk-swatches .t-maroon, .mk-swatches a.t-maroon { background: radial-gradient(ellipse at 50% 20%, #8e1c39, #4a0818); }
.mk-swatches .t-emerald { background: radial-gradient(ellipse at 50% 20%, #237a5b, #083223); }
.mk-swatches .t-ivory { background: radial-gradient(ellipse at 50% 20%, #fffbf3, #f0dcb6); box-shadow: inset 0 0 0 4px #fbf1de, inset 0 0 0 5px #e0558d, 0 10px 20px -10px rgba(0, 0, 0, .3); }
.mk-ticks { list-style: none; padding: 0; margin: 26px auto 0; max-width: 900px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 20px; }
.mk-ticks li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .95rem; }
.mk-ticks svg { width: 16px; height: 16px; color: var(--mehendi); flex: none; }

.mk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mk-feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.mk-feature > svg { width: 26px; height: 26px; color: var(--rani); }
.mk-feature h3 { font-size: 1.08rem; }
.mk-feature p { color: var(--muted); font-size: .93rem; line-height: 1.55; }

.mk-days { background: var(--ink); color: var(--bg); }
.mk-days .eyebrow { color: var(--marigold-bright); }
.mk-days-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mk-day { display: flex; gap: 14px; padding: 22px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--bg) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bg) 16%, transparent); }
.mk-day h3 { font-size: 1.1rem; margin-bottom: 6px; }
.mk-day p { opacity: .78; font-size: .94rem; line-height: 1.55; }
.mk-day-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--marigold-bright) 22%, transparent); color: var(--marigold-bright); }
.mk-day-icon svg { width: 22px; height: 22px; }

.mk-family { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.mk-list { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.mk-list li { padding-left: 26px; position: relative; color: var(--ink-2); line-height: 1.55; }
.mk-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 3px; background: var(--marigold-bright); transform: rotate(45deg); }
.mk-privacy { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.mk-privacy > svg { width: 28px; height: 28px; color: var(--mehendi); }
.mk-privacy p { color: var(--muted); line-height: 1.6; }

.mk-how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: none; }
.mk-how li { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.mk-how b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--rani); color: var(--on-accent); font-weight: 700; }
.mk-how h3 { font-size: 1.05rem; }
.mk-how p { color: var(--muted); font-size: .93rem; line-height: 1.55; }

.mk-final { position: relative; margin: 20px max(16px, calc((100% - var(--mk-max)) / 2)) 60px; padding: 74px 24px 56px; border-radius: 28px; text-align: center; color: #f6e6c4; background: radial-gradient(ellipse at 50% 0%, #8e1c39, #4a0818 75%); box-shadow: 0 40px 80px -40px rgba(60, 10, 30, .6); }
.mk-final h2 { color: #fff4cf; }
.mk-final p { margin: 12px auto 0; max-width: 48ch; opacity: .9; font-size: 1.05rem; }
.mk-final .btn:not(.primary) { background: transparent; color: #f6e6c4; border-color: rgba(246, 230, 196, .45); }
.mk-final-art { position: absolute; top: -14px; left: 50%; width: min(440px, 84%); transform: translateX(-50%); }

.mk-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 22px max(16px, calc((100% - var(--mk-max)) / 2)) 32px; border-top: 1px solid var(--line); }
.mk-foot a { color: var(--rani); }

@keyframes mk-float { 0%, 100% { transform: translateY(0) rotate(3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
.mk-float-1 { animation-name: mk-bob; }
.mk-float-2 { animation-name: mk-bob; }
@keyframes mk-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1000px) {
  .mk-links { display: none; }
  .mk-nav-actions { margin-left: auto; }
  .mk-hero { grid-template-columns: 1fr; gap: 56px; padding-top: 40px; text-align: left; }
  .mk-steps3, .mk-grid, .mk-days-grid { grid-template-columns: 1fr 1fr; }
  .mk-how { grid-template-columns: 1fr 1fr; }
  .mk-family { grid-template-columns: 1fr; }
  .mk-ticks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .mk-nav { gap: 10px; }
  .mk-nav-actions .btn.ghost { display: none; }
  .mk-section { padding-top: 52px; padding-bottom: 52px; }
  .mk-steps3, .mk-grid, .mk-days-grid, .mk-how, .mk-ticks { grid-template-columns: 1fr; }
  .mk-phone { width: 250px; }
  .mk-float-1 { left: 0; top: 6%; }
  .mk-float-2 { right: 0; bottom: 6%; }
  .mk-big { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .mk-phone, .mk-float, .mk-mini-diyas .flame { animation: none; } }

/* Sign-up bot trap: off screen, never seen by people */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Destructive actions */
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.danger-zone h3 { color: var(--danger); }
.btn.disabled-look { opacity: .45; }

/* ───────── Legal pages (privacy, terms, contact) ───────── */
.legal { min-height: 100vh; display: flex; flex-direction: column; }
.legal-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px max(16px, calc((100% - 760px) / 2)); border-bottom: 1px solid var(--line); background: var(--surface); }
.legal-body { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 16px 56px; line-height: 1.7; color: var(--ink-2); }
.legal-body h1 { font-size: clamp(1.9rem, 5vw, 2.4rem); color: var(--ink); margin-bottom: 6px; }
.legal-body h2 { font-size: 1.15rem; color: var(--ink); margin: 30px 0 8px; font-family: var(--body); font-weight: 700; }
.legal-body p { margin: 0 0 12px; }
.legal-body ul { margin: 0 0 12px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--rani); }
.legal-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.legal-card h2 { margin: 0; }
.legal-card p { margin: 0; font-size: .95rem; }
@media (max-width: 640px) { .legal-cards { grid-template-columns: 1fr; } }

/* Small footer: © · Privacy · Terms · Contact */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 18px 16px 26px; font-size: .8rem; color: var(--muted); }
.legal-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.auth-legal { padding-bottom: 8px; }
.iv-legal { color: color-mix(in srgb, var(--iv-cream) 65%, transparent); padding: 14px 0 0; font-family: var(--body); }
.iv-foot { display: flex; flex-direction: column; align-items: center; }

/* ───────── 404 and error pages ───────── */
.oops { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 40px 20px; position: relative; }
.oops-art { width: min(360px, 80%); color: var(--marigold); }
.oops-art svg { width: 100%; height: auto; display: block; }
.oops-art svg .ln { fill: none; stroke: currentColor; stroke-width: 1.2; }
.oops-art svg .thin { stroke-width: .7; opacity: .7; }
.oops-art svg .mg-o { fill: #f08a00; }
.oops-art svg .mg-y { fill: #ffc21a; }
.oops-art svg .mg-c { fill: #b04f00; }
.oops-art svg .leaf { fill: #3f7d2a; }
.oops-art svg .leaf-vein { fill: none; stroke: #2a5a1c; stroke-width: .8; }
.oops-code { font-family: var(--display); font-size: 4.5rem; line-height: 1; color: var(--rani); margin-top: 8px; }
.oops h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); }
.oops p { color: var(--muted); max-width: 46ch; }
.oops-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.oops-links { position: absolute; bottom: 0; left: 0; right: 0; }

/* ───────── Demo invitation ribbon ───────── */
.demo-ribbon {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 25;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; padding: 8px 10px 8px 16px;
  border-radius: 16px; background: rgba(20, 8, 16, .82); color: #f6e6c4; backdrop-filter: blur(8px);
  font: 500 .82rem var(--body); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6); width: max-content; max-width: calc(100vw - 24px);
}
.demo-themes { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.demo-themes a { color: #f6e6c4; text-decoration: none; padding: 5px 10px; border-radius: 99px; border: 1px solid rgba(227, 185, 95, .35); }
.demo-themes a.on { background: linear-gradient(110deg, #c99a3c, #f5dc95, #c99a3c); color: #3a0612; border-color: transparent; }
.demo-cta { background: #B0185A; color: #fff; text-decoration: none; padding: 7px 14px; border-radius: 99px; font-weight: 600; }
.mk-swatches a { display: block; width: 58px; height: 86px; border-radius: 29px 29px 8px 8px / 18px 18px 8px 8px; transition: transform .2s; }
.mk-swatches a:hover { transform: translateY(-4px); }

.mk-notice { max-width: 1100px; margin: 12px auto 0; width: calc(100% - 32px); }
.danger-zone summary { cursor: pointer; }
