/* Govindam DigInvites, website / editor / admin / account / guest pages.
   Follows DESIGN-apple.md exactly, with garnet (#a8203a) as the single accent in place of Action Blue.
   Weights 300/400/600/700 only (no 500). No shadows on chrome. Radii: 8 utility, 11 pearl, 18 cards, pill.
   Never loaded by the five invitation templates. */
:root {
  --sys: 'SF Pro Text', system-ui, -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  --sys-display: 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  --primary: #a8203a; --primary-focus: #c2334e; --on-primary: #ffffff;
  --ink: #1d1d1f; --ink-80: #333333; --ink-48: #7a7a7a;
  --canvas: #ffffff; --parchment: #f5f5f7; --pearl: #fafafc;
  --divider-soft: #f0f0f0; --hairline: #e0e0e0; --hair-a: rgba(0, 0, 0, .08);
  --ok: #248a3d; --warn: #b25000; --off: #7a7a7a;
  --r-sm: 8px; --r-md: 11px; --r-lg: 18px; --r-pill: 9999px;
}

/* type: body 17/400/1.47, captions 14, display 600 with tight tracking */
html body { font: 400 17px/1.47 var(--sys); letter-spacing: -0.374px; color: var(--ink); background: var(--parchment); -webkit-font-smoothing: antialiased; }
html body h1, html body h2, html body h3 { font-family: var(--sys-display) !important; font-weight: 600 !important; color: var(--ink); }
html body h1 { font-size: 34px; line-height: 1.18; letter-spacing: -0.374px; }
html body h2 { font-size: 21px; line-height: 1.19; letter-spacing: 0.231px; }
html body h3 { font-size: 17px; line-height: 1.24; letter-spacing: -0.374px; }
@media (max-width: 419px) { html body h1 { font-size: 28px; } }
html body .muted, html body .hint, html body .hint-c, html body .lead { color: var(--ink-48); font-size: 14px; line-height: 1.43; letter-spacing: -0.224px; }
html body a { color: var(--primary); }
html body strong, html body b { font-weight: 600; }
html body :focus-visible { outline: 2px solid var(--primary-focus) !important; outline-offset: 2px; box-shadow: none !important; }

/* frosted sub-nav: parchment at 80% with blur, hairline below, no shadow */
html body header.abar, html body .ebar, html body > header {
  background: rgba(245, 245, 247, .8) !important; -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: none !important; border: 0 !important; border-bottom: 1px solid var(--hair-a) !important; min-height: 52px; }

/* buttons */
html body .abtn, html body .ebtn, html body .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 11px 22px !important;
  font: 400 17px/1 var(--sys) !important; letter-spacing: -0.374px !important; text-transform: none !important; text-decoration: none !important;
  background: var(--primary) !important; color: var(--on-primary) !important; border: 1px solid var(--primary) !important; border-radius: var(--r-pill) !important;
  box-shadow: none !important; filter: none !important; cursor: pointer; transition: transform .12s ease; }
html body .abtn:active, html body .ebtn:active, html body .btn:active { transform: scale(.95); }
/* secondary: ghost pill */
html body .abtn.ghost, html body .ebtn.ghost, html body .btn.ghost { background: var(--canvas) !important; color: var(--primary) !important; border: 1px solid var(--primary) !important; }
/* compact actions inside rows and cards: pearl capsule */
html body .abtn.small, html body .ebtn.small, html body .btn.sm {
  min-height: 36px; padding: 8px 14px !important; font: 400 14px/1.29 var(--sys) !important; letter-spacing: -0.224px !important;
  background: var(--pearl) !important; color: var(--ink-80) !important; border: 3px solid var(--divider-soft) !important; border-radius: var(--r-md) !important; }
html body .abtn.small.ok { background: var(--primary) !important; color: var(--on-primary) !important; border-color: var(--primary) !important; }
html body .abtn:disabled, html body .ebtn:disabled, html body .btn:disabled { color: var(--ink-48) !important; opacity: .6; cursor: default; transform: none; }

/* utility cards: white, 1px hairline, 18px, 24px padding, no shadow */
html body .acard, html body .panel, html body .tile, html body .ev, html body .tpl, html body .step, html body .eform .card {
  background: var(--canvas) !important; border: 1px solid var(--hairline) !important; border-radius: var(--r-lg) !important; box-shadow: none !important; }
html body .acard, html body .panel { padding: 24px; }
html body .row { background: var(--canvas) !important; border: 1px solid var(--hairline) !important; border-radius: var(--r-lg) !important; box-shadow: none !important; padding: 17px 24px; }
html body .row h3, html body .inv h3 { font: 600 17px/1.24 var(--sys) !important; letter-spacing: -0.374px !important; }
html body .row p, html body .inv p { font-size: 14px; line-height: 1.43; letter-spacing: -0.224px; color: var(--ink-48); }

/* status: a dot and plain words (caption, 400) */
html body .pill { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 0; background: none !important; border: 0; border-radius: 0;
  font: 400 14px/1.29 var(--sys) !important; letter-spacing: -0.224px !important; text-transform: none !important; color: var(--primary) !important; }
html body .pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
html body .pill.ok { color: var(--ok) !important; } html body .pill.hid { color: #a1162c !important; } html body .pill.off { color: var(--off) !important; } html body .pill.wait { color: var(--warn) !important; }
html body .atag { background: var(--ink) !important; color: #fff !important; border-radius: var(--r-sm) !important; padding: 6px 12px !important;
  font: 400 12px/1 var(--sys) !important; letter-spacing: -0.12px !important; text-transform: none !important; }

/* admin sections: option chips (white pill, hairline; selected = 2px accent ring) */
html body .atabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 !important; margin-bottom: 24px; background: none !important; border: 0 !important; overflow: visible; }
html body .atabs button { min-height: 40px !important; padding: 0 16px !important; border-radius: var(--r-pill) !important; background: var(--canvas) !important;
  border: 1px solid var(--hairline) !important; box-shadow: none !important; font: 400 14px/1 var(--sys) !important; letter-spacing: -0.224px !important; color: var(--ink) !important; }
html body .atabs button[aria-selected="true"] { border: 2px solid var(--primary) !important; padding: 0 15px !important; font-weight: 600 !important; color: var(--ink) !important; }

/* labels: caption-strong */
html body label { font: 600 14px/1.29 var(--sys); letter-spacing: -0.224px; color: var(--ink); }
html body label.check, html body label.consent, html body label.toggle, html body .crop-zoom { font-weight: 400; }

/* fields: 44px, 1px rgba(0,0,0,.08), pill (search-input grammar); textareas use the card radius */
html body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), html body select {
  min-height: 44px; padding: 0 20px !important; font: 400 17px/1.3 var(--sys) !important; letter-spacing: -0.374px; color: var(--ink);
  background-color: var(--canvas) !important; border: 1px solid var(--hair-a) !important; border-radius: var(--r-pill) !important; box-shadow: none !important; }
html body textarea { padding: 12px 20px !important; font: 400 17px/1.47 var(--sys) !important; letter-spacing: -0.374px; color: var(--ink);
  background: var(--canvas) !important; border: 1px solid var(--hair-a) !important; border-radius: var(--r-lg) !important; box-shadow: none !important; }
html body input:focus, html body select:focus, html body textarea:focus { outline: 2px solid var(--primary-focus) !important; outline-offset: 0; border-color: transparent !important; }
html body input::placeholder, html body textarea::placeholder { color: var(--ink-48); }
/* dropdowns: same pill, with a quiet chevron */
html body select { -webkit-appearance: none; appearance: none; padding-right: 40px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 18px center !important; background-size: 12px 8px !important; }
html body label.inline select { width: auto; min-width: 120px; margin: 0 0 0 8px; }
html body input[type=checkbox], html body input[type=radio], html body input[type=range] { accent-color: var(--primary); }

/* dialogs: separation comes from the dimmed backdrop, not a shadow */
html body dialog { border-radius: var(--r-lg) !important; border: 1px solid var(--hairline) !important; box-shadow: none !important; background: var(--canvas); }
html body dialog::backdrop { background: rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html body .dlg-x { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50% !important; border: 0 !important; background: rgba(210, 210, 215, .64) !important; color: var(--ink) !important; box-shadow: none !important; font: 400 26px/1 var(--sys) !important; }
html body .dlg-x:focus:not(:focus-visible) { outline: none !important; }

/* tables (guest list) */
html body table { border: 1px solid var(--hairline) !important; border-radius: var(--r-lg) !important; box-shadow: none !important; overflow: hidden; }
html body th { background: var(--parchment) !important; font: 600 14px/1.29 var(--sys) !important; letter-spacing: -0.224px; color: var(--ink); }
html body td { font-size: 14px; letter-spacing: -0.224px; }
html body .chip { border-radius: var(--r-pill); font: 400 12px/1.6 var(--sys) !important; letter-spacing: -0.12px; }

/* toast: dark utility */
html body .toast { border-radius: var(--r-sm) !important; background: var(--ink) !important; color: #fff !important; font: 400 14px/1.29 var(--sys) !important; letter-spacing: -0.224px; box-shadow: none !important; }

/* editor details */
html body .step > summary { font: 600 21px/1.19 var(--sys-display) !important; letter-spacing: 0.231px !important; color: var(--ink); }
html body .step > summary .num { font: 600 14px/1 var(--sys) !important; background: var(--ink) !important; color: #fff !important; }
html body .lockbox { background: var(--parchment) !important; border: 0 !important; border-radius: var(--r-lg) !important; }
html body .namecheck { background: var(--parchment); border-radius: var(--r-lg); }
html body .etabs button { border-radius: var(--r-pill) !important; font: 400 17px/1 var(--sys) !important; box-shadow: none !important; }
html body .etabs button.on { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
/* blessing picker: option chips (white, hairline, selected = 2px accent ring) */
html body .god { border: 1px solid var(--hairline) !important; border-radius: var(--r-lg) !important; background: var(--canvas) !important; box-shadow: none !important;
  font: 400 14px/1.29 var(--sys) !important; letter-spacing: -0.224px; color: var(--ink) !important; }
html body .god[aria-pressed="true"] { border: 2px solid var(--primary) !important; background: var(--canvas) !important; }
/* phones: the header keeps only back, logo, Publish and the profile photo */
@media (max-width: 600px) {
  html body .ebar .ebtn { padding: 0 16px !important; font-size: 15px !important; min-height: 40px; }
  html body .ebar #saveDraft { display: none !important; }
  html body .ebar .eactions { gap: 6px; }
}
@media (min-width: 601px) { html body #saveDraft2 { display: none !important; } }

/* status messages: red for errors, green for success (contrast 4.5:1 or better) */
html body .msg-error, html body .msg-ok, html body .msg-info { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 14px; border-radius: var(--r-md);
  font: 400 14px/1.43 var(--sys) !important; letter-spacing: -0.224px; }
html body .msg-error { background: #fdecee !important; color: #a1162c !important; }
html body .msg-ok { background: #e8f5ec !important; color: #1b6b33 !important; }
html body .msg-info { background: var(--parchment) !important; color: var(--ink) !important; }
html body .msg-error::before, html body .msg-ok::before { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/18px var(--sys); color: #fff; text-align: center; }
html body .msg-error::before { content: '!'; background: #c4172c; }
html body .msg-ok::before { content: '✓'; background: #248a3d; }
html body #saveState.msg-ok, html body #saveState.msg-info, html body #saveState.msg-error { display: inline-flex; margin-top: 0; padding: 4px 10px; }
html body .toast.msg-error { background: #a1162c !important; color: #fff !important; }
html body .toast.msg-ok { background: #1b6b33 !important; color: #fff !important; }
html body .toast.msg-error::before, html body .toast.msg-ok::before { display: none; }
/* contrast: secondary text #6e6e73 (5.0:1 on white, 4.6:1 on parchment) */
:root { --ink-48: #6e6e73; --off: #6e6e73; }
.preview-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; }
html body .btn.ghost.danger, html body .abtn.danger { color: #a1162c !important; border-color: #a1162c !important; }
html body .more-fields > summary { font: 400 15px/1.3 var(--sys) !important; letter-spacing: -0.24px !important; color: var(--primary) !important; list-style: none; }
html body .more-fields > summary::-webkit-details-marker { display: none; }
html body .more-fields > summary::before, html body .more-fields > summary::after { content: none !important; }
html body .more-fields > summary::after { content: ' ›' !important; display: inline !important; position: static !important; }
html body .more-fields[open] > summary::after { content: ' ⌄' !important; }
/* a field that needs fixing: red border, red ring, short red note under it */
html body .field-bad:not(#_):not(#__), html body input[aria-invalid="true"]:not(#_):not(#__) { border-color: #c4172c !important; box-shadow: 0 0 0 3px rgba(196, 23, 44, .18) !important; }
html body label.field-bad:not(#_):not(#__) { box-shadow: none !important; color: #a1162c; }
html body .slugbox.field-bad input { box-shadow: none !important; }
html body .field-note { display: block; margin-top: 6px; font: 400 13px/1.38 var(--sys); letter-spacing: -0.08px; color: #a1162c; }
html body .field-note::before { content: '! '; font-weight: 700; }

/* one close icon everywhere: a drawn X, 16px, inside a 44px round button */
html body .dlg-x, html body .ph-x { font-size: 0 !important; color: var(--ink) !important; }
html body .dlg-x::before, html body .ph-x::before { content: ''; display: block; width: 16px; height: 16px; margin: auto; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
html body .ph-x { color: #fff !important; }
/* editor photo cards: controls in one tidy row, text starts below them */
html body .photos .ph .ph-x { width: 30px; height: 30px; top: 4px; right: 4px; background: rgba(0, 0, 0, .55) !important; }
html body .photos .ph .ph-x::before { width: 12px; height: 12px; }
html body .photos .ph .ph-grip { width: 30px; height: 30px; border-radius: 9px; box-shadow: none; }
html body .photos .ph .ph-grip svg { width: 16px; height: 16px; }
html body .photos .ph .ph-num { left: 50%; top: 8px; transform: translateX(-50%); min-width: 20px; height: 20px; padding: 0 5px; font: 600 11px/20px -apple-system, system-ui, sans-serif; }
html body .photos .ph.is-story textarea.story { padding: 42px 10px 10px !important; border: 0 !important; border-radius: 0 !important; font-size: 13px !important; line-height: 1.4 !important; }
html body .photos .ph input.cap:not(#_):not(#__):not(#___) { border: 0 !important; border-top: 1px solid rgba(0,0,0,.08) !important; border-radius: 0 !important; min-height: 40px !important; padding: 8px 10px !important; font-size: 13px !important; background: #fff !important; box-shadow: none !important; }
/* editor top bar: "Full screen" (opens the guest view) is distinct from the bottom Edit | Invitation tabs */
html body .ebar #fullPreview { gap: 6px; }
html body .ebar #fullPreview .fs-ic { width: 17px; height: 17px; flex: none; }
html body .ebar [data-auth-slot] * { white-space: nowrap; }
@media (max-width: 430px) {
  html body .ebar .ebrand { display: none !important; }
  html body .ebar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  html body .ebar .ebtn { padding: 0 14px !important; }
}
@media (max-width: 359px) {
  html body .ebar #fullPreview { width: 40px; padding: 0 !important; }
  html body .ebar #fullPreview .fs-t { display: none; }
}
/* checkout: choose how to pay */
html body .paytabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
html body .paytabs button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(0,0,0,.14); background: #fff; color: #1d1d1f; font: 400 15px/1 -apple-system, system-ui, sans-serif; cursor: pointer; }
html body .paytabs button[aria-selected="true"] { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }
html body .upiapps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
html body .upiapp { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 14px; border: 1px solid rgba(0,0,0,.12); background: #fff; color: #1d1d1f; font: 600 15px/1 -apple-system, system-ui, sans-serif; text-decoration: none; }
html body .upiapp:active { background: #f5f5f7; }
html body .linkbtn { border: 0; padding: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
html body .qrwrap { display: flex; justify-content: center; padding: 12px; background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 18px; }
html body .qrwrap canvas { width: 200px; height: 200px; image-rendering: pixelated; }
html body .bankrows { margin: 0; display: grid; gap: 8px; }
html body .bankrows > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f5f5f7; }
html body .bankrows dt { font-size: 13px; color: #6e6e73; }
html body .bankrows dd { margin: 0; display: flex; align-items: center; gap: 8px; }
html body .bankrows code { font: 600 15px ui-monospace, monospace; overflow-wrap: anywhere; }
/* close button: the X is pinned to the exact centre (Safari ignores grid centring on some buttons) */
html body .dlg-x, html body .ph-x { position: absolute; line-height: 0 !important; }
html body .dlg-x::before, html body .ph-x::before { position: absolute; inset: 0; margin: auto !important; }
html body .dlg-x { top: 14px; right: 14px; width: 40px; height: 40px; }
html body .dlg-x:focus { outline: none !important; }
html body .dlg-x:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary) !important; }
html body #dlgTitle:focus { outline: none; }
html body .bankrows code { font-size: 14px; white-space: nowrap; } html body .bankrows dt { flex: none; }
/* date and number fields: Safari draws the date text at the top of tall fields; centre it like every other field */
html body input[type=date], html body input[type=time], html body input[type=datetime-local] {
  -webkit-appearance: none; appearance: none; display: flex; align-items: center; height: 44px; line-height: 44px !important; text-align: left; }
html body input[type=date]::-webkit-date-and-time-value, html body input[type=time]::-webkit-date-and-time-value { margin: 0; text-align: left; line-height: 1.3; }
html body input[type=date]::-webkit-datetime-edit, html body input[type=time]::-webkit-datetime-edit { padding: 0; line-height: 1.3; }
html body input[type=date]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
/* number fields: no tiny up/down arrows (type the number instead) */
html body input[type=number] { -moz-appearance: textfield; appearance: textfield; }
html body input[type=number]::-webkit-inner-spin-button, html body input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* editor preview: one slim bar above the invitation (live status + replay); full screen lives in the top bar only */
html body .pvbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 390px; max-width: 100%; margin: 0 0 10px; }
html body .pvlive { display: inline-flex; align-items: center; gap: 8px; font: 400 14px/1.3 var(--sys); color: var(--ink-48, #6e6e73); }
html body .pvdot { width: 8px; height: 8px; border-radius: 50%; background: #1f8a3b; box-shadow: 0 0 0 3px rgba(31,138,59,.15); }
html body .pvreplay { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(0,0,0,.14); background: #fff; color: #1d1d1f; font: 400 14px/1 var(--sys); cursor: pointer; }
html body .pvreplay svg { width: 15px; height: 15px; }
html body .pvreplay:active { background: #f5f5f7; }
@media (max-width: 900px) {
  html body.tab-preview .eshell { padding: 0 0 calc(64px + env(safe-area-inset-bottom)) !important; }
  html body.tab-preview .pvbar { width: 100%; margin: 0; padding: 6px 16px; height: 48px; box-sizing: border-box; background: #fff; border-bottom: 1px solid rgba(0,0,0,.06); }
  html body.tab-preview .phone { height: calc(100svh - var(--ebar-h, 64px) - 48px - 64px - env(safe-area-inset-bottom)) !important; }
  html body.tab-preview { overflow: hidden; }
}
/* dialog title: receives focus on open for screen readers, but never shows a ring; leaves room for the close button */
html body dialog h2#dlgTitle, html body dialog h2#dlgTitle:focus, html body dialog h2#dlgTitle:focus-visible { outline: none !important; box-shadow: none !important; border: 0 !important; }
html body dialog h2#dlgTitle { padding-right: 52px; }
html body dialog { -webkit-tap-highlight-color: transparent; }
html body .photos .ph .ph-grip::after, html body .photos .ph .ph-x::after { content: ""; position: absolute; inset: -7px; } /* 44px touch area around the 30px controls */
/* checkboxes and radios: 22px boxes; the whole label is the tap target (WCAG 2.1 2.5.5 / 2.2 2.5.8) */
html body input[type=checkbox], html body input[type=radio] { width: 22px !important; height: 22px !important; min-height: 0 !important; margin: 0 10px 0 0 !important; flex: none; vertical-align: middle; cursor: pointer; }
html body label:has(> input[type=checkbox]), html body label:has(> input[type=radio]) { display: flex; align-items: flex-start; gap: 0; min-height: 44px; padding: 10px 0; cursor: pointer; line-height: 1.4; }
html body label:has(> input[type=checkbox]) > input, html body label:has(> input[type=radio]) > input { margin-top: 0 !important; }
