/* ═══════════════════════════════════════════════════════════════
   PRANAM Registration — styles
   Mobile-first. Warm saffron / gold / maroon palette on cream.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --cream: #FBF6EE;
  --cream-2: #F5EBDC;
  --surface: #FFFFFF;
  --line: #EEDFC9;
  --line-strong: #E2CBA8;

  --saffron: #E8731A;
  --saffron-deep: #C2410C;
  --saffron-soft: #FDEBD8;
  --gold: #D4A017;
  --gold-soft: #FBF0C9;
  --maroon: #6B1D2A;
  --maroon-deep: #4A0F19;

  --ink: #2B1A12;
  --ink-2: #5A4538;
  --muted: #8A7466;
  --danger: #C0392B;
  --danger-soft: #FBE4E1;
  --success: #2E7D4F;

  /* day colour coding */
  --d1: #C2410C; --d1-soft: #FDEBD8; --d1-line: #F3C6A0;   /* Thursday · saffron */
  --d2: #8A6A0C; --d2-soft: #FBF0C9; --d2-line: #E9D48A;   /* Friday · gold */
  --d3: #2E7D4F; --d3-soft: #E3F1E7; --d3-line: #B7DCC3;   /* Saturday · green */
  --d0: #2F5C9E; --d0-soft: #EAF0F8; --d0-line: #BFD0E8;   /* any day · blue */

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(74, 15, 25, .04), 0 12px 40px -12px rgba(194, 65, 12, .18);
  --shadow-lg: 0 2px 4px rgba(74, 15, 25, .05), 0 30px 70px -20px rgba(194, 65, 12, .28);

  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--saffron-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
[hidden] { display: none !important; }

/* ── Ambient background ────────────────────────────────────────── */
.ambient {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55;
  animation: drift 24s ease-in-out infinite alternate;
}
.orb-1 { width: 55vmax; height: 55vmax; top: -20vmax; left: -15vmax; background: radial-gradient(circle, #FFC98A, transparent 65%); }
.orb-2 { width: 45vmax; height: 45vmax; bottom: -15vmax; right: -15vmax; background: radial-gradient(circle, #F7B27A, transparent 65%); animation-delay: -8s; }
.orb-3 { width: 30vmax; height: 30vmax; top: 40%; left: 55%; background: radial-gradient(circle, #FFE7A8, transparent 65%); opacity: .45; animation-delay: -16s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); }
}
.mandala {
  position: absolute; left: 50%; top: -30vmax; width: 120vmax; height: 120vmax;
  transform: translateX(-50%);
  background:
    repeating-radial-gradient(circle at center, rgba(194, 65, 12, .07) 0 1px, transparent 1px 44px),
    repeating-conic-gradient(from 0deg, rgba(212, 160, 23, .06) 0 1deg, transparent 1deg 15deg);
  -webkit-mask: radial-gradient(circle at center, #000 0%, transparent 62%);
          mask: radial-gradient(circle at center, #000 0%, transparent 62%);
  animation: spin 240s linear infinite;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .orb, .mandala { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ── Top bar ───────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: rgba(251, 246, 238, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(226, 203, 168, .5);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 34px; width: auto; flex: none; }
.topbar-actions { display: flex; gap: 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: .08em; color: var(--maroon); }
.brand-text small { font-size: .68rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .6); color: var(--saffron-deep);
  font-size: .82rem; font-weight: 600; white-space: nowrap;
  transition: background .2s, transform .15s;
}
.btn-ghost:hover { background: #fff; }
.btn-ghost:active { transform: scale(.97); }
@media (max-width: 420px) { .btn-ghost span { display: none; } .btn-ghost { padding: 8px 10px; } .brand-text small { display: none; } }

/* ── Layout ────────────────────────────────────────────────────── */
.app {
  width: 100%; max-width: 580px; margin: 0 auto;
  padding: 20px 16px calc(40px + var(--safe-b));
}
.view { display: none; }
.view.is-active { display: block; animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
@media (min-width: 520px) { .card { padding: 32px 28px; } }

/* ── Typography helpers ────────────────────────────────────────── */
.eyebrow {
  margin: 0 0 6px; font-size: .74rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--saffron-deep);
}
.hero-sanskrit {
  margin: 4px 0 0; font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 1.15rem; line-height: 1.35; color: var(--ink-2);
}
.hero-sanskrit.left { text-align: left; }
.hero-sanskrit.small { font-size: 1.05rem; margin-top: 8px; }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative; text-align: center;
  padding: 28px 22px 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .78));
  border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-logo { width: 240px; max-width: 80%; height: auto; margin: 10px auto 14px; display: block; filter: drop-shadow(0 8px 16px rgba(74, 15, 25, .12)); animation: bloom 1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bloom { from { transform: scale(.6) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.2rem, 14vw, 4.6rem); line-height: .95; letter-spacing: .12em;
  color: var(--maroon);
  background: linear-gradient(180deg, var(--maroon) 0%, #9A2F3D 60%, var(--saffron-deep) 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0; color: var(--gold); }
.ornament span { flex: 1; max-width: 90px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament i { font-style: normal; font-size: 1.3rem; line-height: 1; }
.hero-lead { margin: 0 auto; max-width: 42ch; font-size: .98rem; color: var(--ink-2); }
.hero-lead em { color: var(--saffron-deep); font-style: italic; }

.facts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.facts li {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.facts svg { width: 26px; height: 26px; flex: none; color: var(--saffron-deep); }
.facts strong { display: block; font-size: .95rem; }
.facts span { display: block; font-size: .8rem; color: var(--muted); line-height: 1.35; }

.hero-actions { display: grid; gap: 10px; margin-top: 22px; }
.hero-actions .btn-text { justify-self: center; font-size: .9rem; padding: 8px 14px; }
.hero-foot { margin: 18px 0 0; font-size: .74rem; color: var(--muted); line-height: 1.45; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent; position: relative;
}
.btn-lg { padding: 15px 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-deep) 100%);
  box-shadow: 0 10px 24px -8px rgba(194, 65, 12, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { box-shadow: 0 14px 28px -8px rgba(194, 65, 12, .6), inset 0 1px 0 rgba(255, 255, 255, .25); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-primary:disabled { opacity: .7; cursor: progress; transform: none; }
.btn-secondary {
  color: var(--saffron-deep); background: #fff; border-color: var(--line-strong);
}
.btn-secondary:hover { background: var(--saffron-soft); }
.btn-secondary:active { transform: scale(.985); }

.btn-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: rot .7s linear infinite; }
.is-loading .btn-label { opacity: .85; }
.is-loading .btn-spinner { display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

.btn-dashed {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; margin-top: 12px; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--line-strong); background: transparent; color: var(--saffron-deep);
  font-weight: 600; font-size: .92rem; transition: background .2s, border-color .2s;
}
.btn-dashed:hover { background: var(--saffron-soft); border-color: var(--saffron); }

.btn-text {
  background: none; border: 0; padding: 6px 8px; color: var(--saffron-deep);
  font-size: .82rem; font-weight: 600; border-radius: 8px;
}
.btn-text:hover { background: var(--saffron-soft); }
.btn-text.danger { color: var(--danger); }
.btn-text.danger:hover { background: var(--danger-soft); }

/* ── Stepper ───────────────────────────────────────────────────── */
.stepper { position: relative; margin: 4px 8px 18px; }
.stepper-track { position: absolute; left: 10%; right: 10%; top: 15px; height: 3px; background: var(--line); border-radius: 3px; }
.stepper-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--saffron-deep)); border-radius: 3px; transition: width .45s cubic-bezier(.2, .7, .2, 1); }
.stepper-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.stepper-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stepper-steps .dot {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line-strong); color: var(--muted);
  font-size: .8rem; font-weight: 700; transition: all .3s;
}
.stepper-steps .lbl { font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.stepper-steps li.is-active .dot { border-color: var(--saffron-deep); color: var(--saffron-deep); box-shadow: 0 0 0 5px var(--saffron-soft); }
.stepper-steps li.is-active .lbl { color: var(--saffron-deep); }
.stepper-steps li.is-done .dot { background: var(--saffron-deep); border-color: var(--saffron-deep); color: #fff; }
.stepper-steps li.is-done .lbl { color: var(--ink-2); }

/* ── Steps ─────────────────────────────────────────────────────── */
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step.anim-in { animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; }
.step-head { margin-bottom: 20px; }
.step-kicker { margin: 0 0 4px; font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--saffron-deep); }
.step-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.05; color: var(--maroon); }
.step-sub { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }
.step-foot { margin-top: 26px; }
.step-foot.split { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.step-foot.split .btn-secondary { padding-left: 20px; padding-right: 20px; }

/* ── Fields ────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.field .hint { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }
.field input, .field select {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--cream);
  font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: #B8A697; }
.field input:focus, .field select:focus { border-color: var(--saffron); background: #fff; box-shadow: 0 0 0 4px var(--saffron-soft); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); background: #fff; }
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--danger-soft); }

.input-affix { position: relative; }
.input-affix .affix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-affix input { padding-left: 46px; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select-wrap select { padding-right: 42px; }
.select-wrap select:invalid, .select-wrap select option[value=""] { color: #B8A697; }

.error { display: none; margin: 6px 0 0; font-size: .8rem; color: var(--danger); font-weight: 500; }
.error.is-visible { display: block; animation: shake .35s; }
.submit-error { margin-top: 14px; padding: 12px 14px; background: var(--danger-soft); border-radius: 10px; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* ── Segmented control ─────────────────────────────────────────── */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--cream-2); border-radius: 999px; margin-bottom: 18px; }
.seg { padding: 12px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: .92rem; color: var(--muted); transition: all .25s; }
.seg[aria-pressed="true"] { background: #fff; color: var(--saffron-deep); box-shadow: 0 2px 8px rgba(74, 15, 25, .1); }

/* ── Family member cards ───────────────────────────────────────── */
.family-list { display: grid; gap: 12px; }
.member {
  position: relative; padding: 16px; border-radius: var(--radius-sm);
  background: var(--cream); border: 1px solid var(--line);
  animation: rise .35s cubic-bezier(.2, .7, .2, 1) both;
}
.member-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.member-head h3 { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--saffron-deep); display: flex; align-items: center; gap: 8px; }
.member-head h3 .num { width: 22px; height: 22px; border-radius: 50%; background: var(--saffron-deep); color: #fff; display: grid; place-items: center; font-size: .72rem; }
.member .field { margin-bottom: 12px; }
.member .field:last-child { margin-bottom: 0; }
.member .field input, .member .field select { background: #fff; }

/* ── Slots: participant pills + 3×3 tile grid ─────────────── */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pills::-webkit-scrollbar { display: none; }
.pills:empty { display: none; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink-2);
  font-weight: 600; font-size: .85rem; transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.pill .avatar { width: 28px; height: 28px; font-size: .68rem; }
.pill-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--cream-2); color: var(--muted); font-size: .72rem; font-weight: 700; }
.pill.is-active { border-color: var(--saffron-deep); background: var(--saffron-soft); color: var(--saffron-deep); box-shadow: 0 6px 14px -8px rgba(194, 65, 12, .5); }
.pill.is-active .pill-count { background: var(--saffron-deep); color: #fff; }
.pill.is-empty:not(.is-active) .pill-count { background: var(--danger-soft); color: var(--danger); }

.slot-cards { display: grid; gap: 12px; margin-top: 12px; }
.slot-card.has-none { border-color: var(--line-strong); }
.slot-card { padding: 14px; border-radius: var(--radius-sm); background: var(--cream); border: 1px solid var(--line); transition: border-color .2s; }
.slot-card.has-none.flash { border-color: var(--danger); }
.slot-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.participant-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--saffron-deep)); color: #fff; font-weight: 700; font-size: .85rem;
}
.participant-name strong { display: block; font-size: .95rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant-name span { display: block; font-size: .74rem; color: var(--muted); }

.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile {
  position: relative; min-width: 0; aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 8px 4px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink);
  transition: all .18s; -webkit-tap-highlight-color: transparent; user-select: none;
}
.tile b { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; line-height: 1; }
.tile small { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.tile span { font-size: .7rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile span.to { font-weight: 500; color: var(--muted); font-size: .66rem; }
.tile.d1 { background: var(--d1-soft); border-color: var(--d1-line); } .tile.d1 b, .tile.d1 small { color: var(--d1); }
.tile.d2 { background: var(--d2-soft); border-color: var(--d2-line); } .tile.d2 b, .tile.d2 small { color: var(--d2); }
.tile:hover { transform: translateY(-1px); filter: brightness(.98); }
.tile-check { position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #fff; display: grid; place-items: center; opacity: 0; transform: scale(.5); transition: all .18s; }
.tile-check svg { width: 12px; height: 12px; }
.tile[aria-pressed="true"] { border-color: transparent; color: #fff; }
.tile[aria-pressed="true"] b, .tile[aria-pressed="true"] small, .tile[aria-pressed="true"] span { color: #fff; }
.tile[aria-pressed="true"] small, .tile[aria-pressed="true"] span.to { color: rgba(255, 255, 255, .85); }
.tile[aria-pressed="true"] .tile-check { opacity: 1; transform: none; background: rgba(255, 255, 255, .25); }
.tile.d1[aria-pressed="true"] { background: linear-gradient(145deg, var(--saffron) 0%, var(--saffron-deep) 100%); box-shadow: 0 10px 20px -10px rgba(194, 65, 12, .7); }
.tile.d2[aria-pressed="true"] { background: linear-gradient(145deg, #E0A928 0%, #B4801A 100%); box-shadow: 0 10px 20px -10px rgba(180, 128, 26, .7); }
@media (max-width: 360px) { .tile b { font-size: 1.7rem; } .tile span { font-size: .62rem; } .tile small { font-size: .6rem; } }

/* seva categories */
.seva-who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.seva-who .avatar { width: 44px; height: 44px; font-size: 1rem; }
.seva-who strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: var(--maroon); }
.seva-who span { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.seva-cats { display: grid; gap: 8px; }
.scat { border-radius: 14px; border: 1.5px solid var(--line-strong); background: #fff; overflow: hidden; transition: all .18s; }
.scat.is-on { border-color: var(--d0); background: var(--d0-soft); }
.scat-head { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 12px 12px; background: none; border: 0; text-align: left; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.scat-check { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; display: grid; place-items: center; color: #fff; transition: all .18s; }
.scat-check svg { width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: all .18s; }
.scat.is-on .scat-check { background: var(--d0); border-color: var(--d0); }
.scat.is-on .scat-check svg { opacity: 1; transform: none; }
.scat-body { display: flex; flex-direction: column; min-width: 0; }
.scat-body b { font-size: 1rem; font-weight: 700; }
.scat-body span { font-size: .76rem; color: var(--muted); }
.scat-count { font-size: .72rem; font-weight: 700; color: var(--d0); white-space: nowrap; }
.scat-days { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px 48px; animation: rise .25s cubic-bezier(.2, .7, .2, 1) both; }
.dchip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; font-size: .8rem; font-weight: 600; color: var(--muted); transition: all .18s; -webkit-tap-highlight-color: transparent; }
.dchip::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; flex: none; }
.dchip[aria-pressed="true"] { background: var(--d0); border-color: var(--d0); color: #fff; }
.dchip[aria-pressed="true"]::before { content: "✓"; display: grid; place-items: center; font-size: 10px; line-height: 1; color: var(--d0); border-color: #fff; }
@media (max-width: 380px) { .scat-days { padding-left: 12px; } }

/* legend + sub headings */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 4px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.legend-item i { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid; }
.legend-item.d1 i { background: var(--d1-soft); border-color: var(--d1); } .legend-item.d2 i { background: var(--d2-soft); border-color: var(--d2); }
.legend-item.d3 i { background: var(--d3-soft); border-color: var(--d3); } .legend-item.d0 i { background: var(--d0-soft); border-color: var(--d0); }
.sub-h { margin: 18px 0 6px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--maroon); }
.sub-h:first-child { margin-top: 0; }
.sub-p { margin: 0 0 6px; font-size: .86rem; color: var(--muted); }
.tag.d1 { background: var(--d1-soft); color: var(--d1); } .tag.d2 { background: var(--d2-soft); color: var(--d2); }
.tag.d3 { background: var(--d3-soft); color: var(--d3); } .tag.d0 { background: var(--d0-soft); color: var(--d0); }
.laks-ask { margin: 4px 0 8px; background: var(--gold-soft); border-color: var(--line-strong); }
.pledge { margin: 12px 0 0; padding: 14px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--gold-soft), var(--saffron-soft)); border: 1px solid var(--line-strong); }
.pledge-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pledge-head svg { width: 26px; height: 26px; flex: none; color: var(--saffron-deep); }
.pledge-head strong { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.1; color: var(--maroon); }
.pledge-head span { display: block; font-size: .74rem; color: var(--muted); }
.pledge > p { margin: 0 0 10px; font-size: .88rem; line-height: 1.5; color: var(--ink-2); }
.check.pledge-check { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line-strong); font-weight: 600; color: var(--ink); }
.check.pledge-check:has(input:checked) { border-color: var(--saffron-deep); }
.pledge .error { margin-top: 8px; }
.member .laks-ask { background: #fff; }

.slot-card-foot { display: flex; justify-content: center; align-items: center; margin-top: 10px; }
.btn-text.strong { font-size: .9rem; }
.btn-inline { background: none; border: 0; padding: 0; color: var(--saffron-deep); font-weight: 600; font-size: inherit; text-decoration: underline; cursor: pointer; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input[readonly] { background: var(--cream-2); color: var(--ink-2); cursor: default; }

/* ── Review ────────────────────────────────────────────────────── */
.review { display: grid; gap: 12px; margin-bottom: 18px; }
.rv-card { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--cream); border: 1px solid var(--line); }
.rv-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rv-card-head h3 { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-deep); }
.rv-rows { display: grid; gap: 4px; }
.rv-row { display: grid; grid-template-columns: 88px 1fr; gap: 10px; font-size: .9rem; }
.rv-row span { color: var(--muted); font-size: .8rem; padding-top: 2px; }
.rv-row strong { font-weight: 500; word-break: break-word; }
.rv-person { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.rv-card-head + .rv-person { border-top: 0; padding-top: 0; }
.rv-person .avatar { width: 32px; height: 32px; font-size: .75rem; }
.rv-person-body { min-width: 0; flex: 1; }
.rv-person-body strong { display: block; font-size: .92rem; }
.rv-person-body em { display: block; font-style: normal; font-size: .78rem; color: var(--muted); word-break: break-all; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag { font-size: .72rem; font-weight: 600; padding: 3px 9px 3px 5px; border-radius: 999px; background: var(--saffron-soft); color: var(--saffron-deep); display: inline-flex; align-items: center; gap: 5px; }
.tag b { width: 18px; height: 18px; border-radius: 50%; background: var(--saffron-deep); color: #fff; display: grid; place-items: center; font-size: .68rem; }
.tag.day2 b { background: #8A6A0C; }
.rv-role { font-weight: 400; color: var(--muted); font-size: .78rem; }
.tag.day2 { background: var(--gold-soft); color: #8A6A0C; }
.review.compact .rv-card { background: #fff; }

/* ── Checkbox ──────────────────────────────────────────────────── */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .88rem; color: var(--ink-2); padding: 4px 0; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: #fff; display: grid; place-items: center; color: #fff; transition: all .2s; }
.check-box svg { width: 16px; height: 16px; opacity: 0; transform: scale(.6); transition: all .2s; }
.check input:checked + .check-box { background: var(--saffron-deep); border-color: var(--saffron-deep); }
.check input:checked + .check-box svg { opacity: 1; transform: none; }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 4px var(--saffron-soft); }

/* ── Success ───────────────────────────────────────────────────── */
.success { text-align: center; }
.success-mark { position: relative; width: 110px; height: 110px; margin: 4px auto 14px; animation: bloom 1s cubic-bezier(.2, .8, .2, 1) both; }
.success-mark svg { width: 100%; height: 100%; filter: drop-shadow(0 12px 20px rgba(194, 65, 12, .25)); }
.success-check {
  position: absolute; right: -2px; bottom: 6px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--success); color: #fff; display: grid; place-items: center; border: 3px solid #fff;
  animation: pop .5s .5s cubic-bezier(.2, .8, .2, 1) both;
}
.success-check svg { width: 22px; height: 22px; filter: none; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.success-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: var(--maroon); line-height: 1; }
.success-sub { margin: 10px auto 0; max-width: 40ch; color: var(--ink-2); font-size: .95rem; }
.success-sub b { color: var(--ink); }
.reg-id {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  margin: 20px auto; padding: 12px 26px; border-radius: 16px;
  background: linear-gradient(135deg, var(--gold-soft), var(--saffron-soft)); border: 1px solid var(--line-strong);
}
.reg-id span { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.reg-id strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.35rem; letter-spacing: .06em; color: var(--maroon); }
.success .review { text-align: left; }

/* ── Info sheet ────────────────────────────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(43, 26, 18, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .3s both; }
@keyframes fade { from { opacity: 0; } }
.sheet-panel {
  position: relative; width: 100%; max-width: 640px; max-height: 92dvh;
  background: var(--surface); border-radius: 28px 28px 0 0;
  box-shadow: 0 -20px 60px rgba(74, 15, 25, .3);
  display: flex; flex-direction: column;
  animation: slideUp .45s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 720px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { border-radius: 28px; max-height: 88dvh; }
}
.sheet.is-closing .sheet-panel { animation: slideDown .3s ease-in both; }
.sheet.is-closing .sheet-backdrop { animation: fadeOut .3s both; }
@keyframes slideDown { to { transform: translateY(40px); opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

.sheet-head { position: relative; flex: none; height: 44px; }
.sheet-grip { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 42px; height: 5px; border-radius: 5px; background: var(--line-strong); }
.sheet-close { position: absolute; right: 12px; top: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--cream-2); color: var(--ink-2); display: grid; place-items: center; }
.sheet-close:hover { background: var(--saffron-soft); color: var(--saffron-deep); }
.sheet-body { overflow-y: auto; padding: 4px 22px calc(28px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
@media (min-width: 520px) { .sheet-body { padding-left: 32px; padding-right: 32px; } }
.sheet-body p { color: var(--ink-2); font-size: .95rem; }
.info-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; letter-spacing: .1em; color: var(--maroon); line-height: 1; }
.info-h { margin: 26px 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--maroon); }
.info-grid { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 480px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-tile { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--cream); border: 1px solid var(--line); }
.info-tile span { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--saffron-deep); margin-bottom: 3px; }
.info-tile strong { font-size: .9rem; font-weight: 500; line-height: 1.4; }

.schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.schedule li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px; border-radius: var(--radius-sm); background: var(--cream); border: 1px solid var(--line); }
.sch-day { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 4px; border-radius: 10px; background: linear-gradient(160deg, var(--saffron), var(--saffron-deep)); color: #fff; }
.sch-day span { font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.sch-day strong { font-size: .88rem; font-weight: 700; line-height: 1.2; }
.sch-body strong { display: block; font-size: .92rem; line-height: 1.35; }
.sch-body span { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); }

.callout { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-top: 16px; padding: 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--gold-soft), var(--saffron-soft)); border: 1px solid var(--line-strong); }
.callout p { margin: 0; font-size: .88rem; }
.callout-num { display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: var(--saffron-deep); }
.callout-num span { font-family: var(--font-body); font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 380px) { .callout { grid-template-columns: 1fr; } }
.info-close-line { margin-top: 20px; font-style: italic; }

/* ── Location ──────────────────────────────────────────────── */
.loc { position: relative; }
.loc-input { position: relative; }
.loc-input > svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--saffron-deep); pointer-events: none; }
.loc-input input { padding-left: 42px; padding-right: 40px; }
.loc-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--cream-2); color: var(--muted); display: grid; place-items: center; }
.loc-clear:hover { background: var(--saffron-soft); color: var(--saffron-deep); }
.loc-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% - 44px); margin: 4px 0 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; }
.loc-list li { padding: 10px 12px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.loc-list li:hover, .loc-list li[aria-selected="true"] { background: var(--saffron-soft); }
.loc-list li strong { font-size: .92rem; font-weight: 600; }
.loc-list li span { font-size: .78rem; color: var(--muted); }
.loc-list li.loc-attr { cursor: default; padding: 4px 12px 2px; font-size: .64rem; color: var(--muted); text-align: right; }
.loc-list li.loc-attr:hover { background: none; }
.btn-loc { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--saffron-deep); font-weight: 600; font-size: .88rem; }
.btn-loc:hover { background: var(--saffron-soft); }
.btn-loc:disabled { opacity: .7; cursor: progress; }
.btn-spinner.dark { border-color: rgba(194, 65, 12, .25); border-top-color: var(--saffron-deep); }
.loc-input input.is-set { background: #fff; border-color: var(--saffron); font-weight: 600; }

/* ── Roles ─────────────────────────────────────────────────── */
.roles { display: grid; gap: 8px; }
.role {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--cream);
  color: var(--ink); transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.roles.compact .role { padding: 10px 12px; background: #fff; }
.role-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; display: grid; place-items: center; transition: all .18s; }
.role-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--saffron-deep); transform: scale(0); transition: transform .18s; }
.role-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.role-body strong { font-size: .95rem; }
.role-body span { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.role:hover { border-color: var(--saffron); }
.role.is-active { border-color: var(--saffron-deep); background: var(--saffron-soft); box-shadow: 0 6px 14px -8px rgba(194, 65, 12, .5); }
.role.is-active .role-dot { border-color: var(--saffron-deep); }
.role.is-active .role-dot::after { transform: scale(1); }
.chanter-confirm { margin: 4px 0 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--gold-soft); border: 1px solid var(--line-strong); }
.role-badge { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 2px 8px; border-radius: 999px; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #EEF5EE; color: var(--success); }
.role-badge.chanter { background: var(--saffron-soft); color: var(--saffron-deep); }
.role-badge.volunteer { background: #E6F0FA; color: #2563EB; }
.rv-note { font-style: normal; font-size: .8rem; color: var(--muted); display: block; margin-top: 4px; }
.empty { padding: 22px 18px; border-radius: var(--radius-sm); background: var(--cream); border: 1px dashed var(--line-strong); text-align: center; }
.empty strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.empty span { font-size: .86rem; color: var(--muted); }
.btn-text:disabled { color: var(--muted); cursor: default; background: none; }

.mandatory { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, var(--maroon), #8A2A3A); color: #fff; }
.mandatory svg { width: 22px; height: 22px; flex: none; opacity: .9; }
.mandatory strong { display: block; font-size: .85rem; line-height: 1.25; }
.mandatory span { display: block; font-size: .72rem; opacity: .85; }
.tag.mandatory { background: var(--maroon); color: #fff; }

/* ── Travel asks ───────────────────────────────────────────── */
.ask { display: grid; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--cream); border: 1px solid var(--line); margin-bottom: 12px; }
.ask-body { display: flex; align-items: center; gap: 12px; }
.ask-body svg { width: 28px; height: 28px; flex: none; color: var(--saffron-deep); }
.ask-body strong { display: block; font-size: .95rem; }
.ask-body span { display: block; font-size: .78rem; color: var(--muted); }
.segmented.small { margin-bottom: 0; max-width: 220px; }
.segmented.small .seg { padding: 9px; font-size: .88rem; }

/* ── Auth (email / OTP) ─────────────────────────────────────── */
.auth-card { text-align: left; }
.auth-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; background: linear-gradient(135deg, var(--gold-soft), var(--saffron-soft)); color: var(--saffron-deep); border: 1px solid var(--line-strong); }
.auth-icon svg { width: 26px; height: 26px; }
.auth-icon.muted { margin: 0 auto 14px; color: var(--muted); background: var(--cream-2); }
.auth-card .step-sub { margin-bottom: 22px; }
.auth-card .step-sub b { color: var(--ink); }
.auth-back { display: block; margin: 14px auto 0; }
.otp-boxes { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 6px; cursor: text; }
.otp-real { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; border: 0; padding: 0; margin: 0; color: transparent; caret-color: transparent; z-index: 2; }
.otp-cell {
  aspect-ratio: 1 / 1.15; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums;
  border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--cream); color: var(--maroon); transition: all .18s; position: relative;
}
.otp-cell.is-filled { border-color: var(--saffron-deep); background: #fff; }
.otp-cell.is-active { border-color: var(--saffron); background: #fff; box-shadow: 0 0 0 4px var(--saffron-soft); }
.otp-cell.is-active:not(.is-filled)::after { content: ""; width: 2px; height: 1.3em; background: var(--saffron-deep); animation: blink 1s steps(2) infinite; }
@keyframes blink { to { opacity: 0; } }
.otp-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.otp-links .btn-text:disabled { color: var(--muted); cursor: default; }
#view-otp .error, #view-email .error { margin-bottom: 14px; }

/* ── Manage dashboard ──────────────────────────────────────── */
.manage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.manage-head .step-title { font-size: 1.7rem; word-break: break-word; }
.status-pill { flex: none; margin-top: 4px; padding: 5px 12px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(46, 125, 79, .1); color: var(--success); border: 1px solid rgba(46, 125, 79, .18); }
.reg-id.compact { display: flex; margin: 0 0 16px; padding: 10px 18px; }
.reg-id.compact strong { font-size: 1.1rem; }
.manage-actions { display: grid; gap: 10px; margin-top: 6px; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-secondary.danger { color: var(--danger); }
.btn-secondary.danger:hover { background: var(--danger-soft); }
.btn-primary.danger { background: linear-gradient(135deg, #D9534F, #B02A26); box-shadow: 0 10px 24px -8px rgba(176, 42, 38, .55); }
.manage .review .rv-card { background: var(--cream); }
.manage .hero-foot { text-align: center; }
.cancel-link { display: block; margin: 18px auto 0; font-size: .82rem; font-weight: 500; opacity: .85; }

/* ── Dialog ────────────────────────────────────────────────── */
.sheet.dialog { align-items: center; padding: 20px; }
.dialog-panel { max-width: 420px; border-radius: 22px; padding: 24px 22px; }
.dialog-title { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--maroon); }
.dialog-text { margin: 0 0 20px; color: var(--ink-2); font-size: .92rem; }

.sheet-logo { width: 150px; max-width: 60%; height: auto; display: block; margin: 4px 0 14px; }

/* ── Toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 20px);
  z-index: 60; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: .86rem; font-weight: 500; opacity: 0; pointer-events: none; transition: all .3s; max-width: calc(100% - 32px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
