/* Zonuru brand: black and white, Apple-style. System font first (SF on Apple devices), Inter elsewhere.
   Event templates (templates.css) override the tokens below inside body[data-template]. */
:root {
  --paper: #ffffff;
  --paper-2: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --hair: rgba(0,0,0,.08);
  --btn: #1d1d1f;
  --btn-ink: #ffffff;
  --btn-2: #f5f5f7;
  --btn-2-ink: #1d1d1f;
  --accent: #1d1d1f;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --display-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: var(--display-sans);
  --display-weight: 700;
  --display-style: normal;
  --display-tracking: -0.025em;
  --label-font: var(--sans);
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.47; letter-spacing: -0.022em; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.shell { max-width: 640px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) 120px max(20px, env(safe-area-inset-left)); }

/* Frosted top bar */
.nav { font-family: var(--sans); letter-spacing: -0.01em; position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hair); }
.nav .in { max-width: 980px; margin: 0 auto; height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
.wordmark { font-family: var(--display-sans); font-weight: 700; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; color: #1d1d1f; }
.nav a.link { font-size: 13px; color: #1d1d1f; text-decoration: none; opacity: .85; }
.nav a.cta-sm { font-size: 13px; font-weight: 500; background: #1d1d1f; color: #fff; text-decoration: none; padding: 5px 12px; border-radius: 980px; }

/* Buttons: Apple pill buttons */
.btn { appearance: none; border: 0; border-radius: 980px; padding: 13px 18px; font-family: var(--sans); font-style: normal; letter-spacing: -0.02em; line-height: 1.2; font-weight: 500; font-size: 16px; background: var(--btn); color: var(--btn-ink); cursor: pointer; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s ease, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--btn-2); color: var(--btn-2-ink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 15px; font-size: 14px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.textlink { color: #0066cc; text-decoration: none; font-size: 15px; }
.textlink:hover { text-decoration: underline; }

/* Headline type */
.eyebrow { font-family: var(--label-font); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1, .h1 { font-family: var(--display); font-weight: var(--display-weight); font-style: var(--display-style); letter-spacing: var(--display-tracking); line-height: 1.05; margin: 0; text-wrap: balance; }
.lead { font-size: 21px; line-height: 1.38; color: var(--muted); letter-spacing: -0.02em; margin: 0; }
.fine { font-size: 13px; color: var(--muted); letter-spacing: -0.01em; }
.empty { color: var(--muted); font-size: 15px; margin: 0; }
.err { color: #d70015; font-size: 14px; font-weight: 500; margin: 0; }

/* Grouped surfaces (iOS Settings style) */
.group { background: var(--card); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.group-head { padding: 14px 18px 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; gap: 8px; }
.group-body { padding: 14px 18px 18px; display: grid; gap: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.list li:last-child { border-bottom: 0; }
.who { min-width: 0; }
.who b { display: block; font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.who span { display: block; font-size: 13px; color: var(--muted); }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-weight: 600; font-size: 13px; flex: none; }
.who-row { display: flex; gap: 12px; align-items: center; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--paper-2); border-radius: 16px; padding: 16px 10px; text-align: center; }
.stat b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.notice { font-size: 14px; padding: 12px 14px; border-radius: 14px; background: #fff8e1; color: #6a4f00; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Forms */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; min-width: 0; }
.form input, .form select, .form textarea { width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 17px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: #0071e3; outline: 0; box-shadow: 0 0 0 4px rgba(0,113,227,.15); }
.form textarea { min-height: 88px; resize: vertical; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 400 !important; }
.check input { width: 20px; height: 20px; accent-color: #1d1d1f; }

/* Bottom sheet: always Zonuru black and white, whatever the template */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.4); display: grid; align-items: end; justify-items: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: #fff; color: #1d1d1f; border-radius: 22px 22px 0 0; padding: 10px 22px calc(26px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2,.8,.2,1);
  --line: #d2d2d7; --muted: #6e6e73; --card: #fff; --ink: #1d1d1f; --btn: #1d1d1f; --btn-ink: #fff; --btn-2: #f5f5f7; --btn-2-ink: #1d1d1f; font-family: var(--sans); letter-spacing: -0.022em; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: #d2d2d7; margin: 0 auto 16px; }
.sheet h3 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.sheet .sub { margin: 0 0 18px; color: #6e6e73; font-size: 15px; }
.payto { background: #f5f5f7; border-radius: 18px; padding: 18px; display: grid; gap: 4px; }
.payto .label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6e6e73; }
.payto .num { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.payto .check-hint { font-size: 14px; color: #6e6e73; margin-top: 8px; }
.payto .acct { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.refbox { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid #d2d2d7; border-radius: 16px; padding: 14px 18px; }
.refbox b { font-size: 22px; letter-spacing: .06em; }
.rsvp-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rsvp-choice label { display: grid !important; place-items: center; padding: 12px 6px; border: 1px solid #d2d2d7; border-radius: 12px; cursor: pointer; font-size: 14px; text-align: center; }
.rsvp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rsvp-choice label:has(input:checked) { border-color: #1d1d1f; box-shadow: inset 0 0 0 1px #1d1d1f; background: #f5f5f7; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: rgba(29,29,31,.92); color: #fff; padding: 12px 18px; border-radius: 980px; font-size: 15px; font-weight: 500; max-width: calc(100% - 40px); backdrop-filter: blur(10px); font-family: var(--sans); }

.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 56px; display: grid; gap: 6px; font-family: var(--sans); letter-spacing: 0; }
.foot a { color: var(--muted); }
.foot .made { font-weight: 600; color: var(--ink); }

@media (max-width: 380px) { .two { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; } }
