:root {
  --pine: #0c2015;
  --pine-2: #12301f;
  --pine-deep: #081a11;
  --cream: #f7f1e3;
  --cream-2: #efe7d2;
  --gold: #cfa42e;
  --gold-soft: #f6ecce;
  --gold-dark: #8a6d1c;
  --crimson: #a2273b;
  --crimson-soft: #f3dfd2;
  --green-mid: #2f5d43;
  --green-dark: #234e35;
  --green-soft: #e4ede4;
  --sage: #b9cfc0;
  --sage-dim: #5d7a68;
  --paper: #f2ecdd;
  --card: #fffdf6;
  --border: #e6dcc4;
  --border-soft: #efe6d0;
  --input-border: #d8ccae;
  --input-bg: #fbf8ee;
  --ink: #24211a;
  --ink-head: #1d3527;
  --muted: #9a927c;
  --muted-2: #6d6142;
  --icon-dim: #b3a888;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Karla', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, .serif { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; color: var(--ink-head); margin: 0; }
a { color: var(--gold-dark); }
a:hover { color: #6d5615; }
button { font: inherit; cursor: pointer; border: none; background: none; padding: 0; }
input, select {
  font: inherit;
  color: var(--ink);
  padding: 11px 14px;
  border: 1px solid var(--input-border);
  border-radius: 9px;
  background: var(--input-bg);
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
input[type='date'] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
}
input::placeholder { color: #a39876; }
input:focus, select:focus { outline: 2px solid rgba(207, 164, 46, 0.5); outline-offset: 0; }

/* ---- dark (pine) pages: landing, reveal ---- */
.night {
  background: radial-gradient(120% 80% at 50% 0%, var(--pine-2) 0%, var(--pine) 55%, var(--pine-deep) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: var(--cream);
}
.night::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(247, 241, 227, 0.65) 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(247, 241, 227, 0.35) 0.9px, transparent 1.4px);
  background-size: 110px 130px, 70px 90px;
  animation: snowdrift 70s linear infinite;
  opacity: 0.5;
  pointer-events: none;
}
@keyframes snowdrift {
  from { background-position: 0 0, 60px 40px; }
  to { background-position: 30px 840px, 90px 900px; }
}
@media (prefers-reduced-motion: reduce) {
  .night::before { animation: none; }
}
.night-content { position: relative; z-index: 1; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
}
.footnote { font-size: 12px; color: var(--sage-dim); letter-spacing: 0.04em; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 700;
  padding: 14px 24px;
  transition: filter 0.15s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-crimson { background: var(--crimson); color: var(--cream); box-shadow: 0 14px 30px rgba(162, 39, 59, 0.35); }
.btn-green { background: var(--green-dark); color: var(--cream); border-radius: 9px; padding: 11px 18px; }
.btn-gold { background: var(--gold); color: #241c05; box-shadow: 0 10px 24px rgba(160, 125, 30, 0.3); }
.btn-ghost { color: var(--muted-2); border: 1px solid var(--input-border); border-radius: 9px; padding: 10px 16px; background: var(--card); }
.icon-btn { display: inline-flex; padding: 6px; border-radius: 7px; color: var(--icon-dim); }
.icon-btn:hover { background: var(--border-soft); color: var(--crimson); }
.icon-btn svg { display: block; }

/* ---- cards & chips ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.card-dark { background: var(--pine); border: none; color: var(--cream); }
.card-dark h3 { color: var(--cream); }
.cream-card {
  background: var(--cream);
  border: 1px solid rgba(207, 164, 46, 0.55);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color: var(--ink);
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.chip-green { background: var(--green-soft); color: var(--green-mid); }
.chip-gold { background: var(--gold-soft); color: var(--gold-dark); }
.chip-red { background: var(--crimson-soft); color: var(--crimson); }
.chip-plain { background: var(--cream-2); color: #55492c; font-size: 13px; font-weight: 600; padding: 7px 14px; }

/* ---- dashboard layout ---- */
.topbar {
  background: var(--pine);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  flex-wrap: wrap;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar-brand .serif { font-size: 22px; color: var(--cream); }
.topbar-group { font-size: 14.5px; font-weight: 600; color: #d8e2d8; }
.topbar-sep { width: 1px; height: 22px; background: rgba(247, 241, 227, 0.22); }
.topbar-role {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(207, 164, 46, 0.16);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.year-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.year-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(247, 241, 227, 0.28);
  color: var(--sage);
  font-size: 14px;
  font-weight: 600;
}
.year-pill.active { background: var(--gold); border-color: var(--gold); color: #241c05; font-weight: 700; }

.tabbar {
  display: flex;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.tab {
  padding: 14px 2px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
}
.tab.active { font-weight: 700; color: var(--ink-head); border-bottom-color: var(--gold); }
.tab:hover:not(.active) { color: var(--muted-2); }

.step-row { display: flex; gap: 14px; }
.step-rail { display: flex; flex-direction: column; align-items: center; }
.step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--gold);
  color: #241c05;
}
.step-dot.pending { background: var(--card); border: 1.5px solid var(--gold); color: var(--gold-dark); }
.step-line { width: 2px; flex-grow: 1; background: var(--border); }
.step-body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 22px; flex: 1 1 auto; min-width: 0; }
.step-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }

.pair-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--input-bg);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.pair-add {
  padding: 7px 11px;
  border: 1px dashed var(--gold);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-dark);
  background: none;
}
.pair-add:hover { background: var(--gold-soft); }

.dash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
  padding: 24px 28px 40px;
  align-items: start;
  max-width: 1220px;
  margin: 0 auto;
}
.dash.single { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.dash-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
}

.card h2 { font-size: 24px; }
.card h3 { font-size: 22px; }
.card-sub { font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-top: 1px solid var(--border-soft);
}
.row-main { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.row-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-0 { background: var(--green-soft); color: var(--green-mid); }
.avatar-1 { background: var(--crimson-soft); color: var(--crimson); }
.avatar-2 { background: #f0e6c8; color: var(--gold-dark); }

.check-line { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.5; color: #4a4536; }
.check-line svg { margin-top: 2px; flex-shrink: 0; }

.banner {
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.5;
}
.banner-warn { background: var(--gold-soft); color: var(--gold-dark); border: 1px solid #e8d9a8; }
.banner-error { background: var(--crimson-soft); color: var(--crimson); border: 1px solid #e8c4c9; }
.banner-ok { background: var(--green-soft); color: var(--green-mid); border: 1px solid #cfe0cf; }

.field-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.field { display: flex; flex-direction: column; gap: 6px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pine);
  color: var(--cream);
  border-radius: 11px;
  padding: 13px 22px;
  font-size: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  z-index: 10;
  max-width: min(520px, 90vw);
}
.toast.error { background: var(--crimson); }

.hidden { display: none !important; }

/* ---- reveal page ---- */
.reveal-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 44px 24px 32px;
  max-width: 460px;
  margin: 0 auto;
}
.reveal-hello { font-size: 36px; font-weight: 500; color: var(--cream); text-align: center; line-height: 1.1; }
.reveal-card {
  width: 100%;
  padding: 34px 26px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.reveal-eyebrow-dark {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.reveal-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 52px;
  line-height: 1.05;
  color: var(--crimson);
  overflow-wrap: anywhere;
}
.reveal-note { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--sage); }
.gift-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--crimson);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pop-in { animation: popIn 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.85) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- landing ---- */
.landing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 48px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.landing-nav { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 64px;
  align-items: center;
  flex: 1;
  padding: 24px 0;
}
@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; gap: 40px; }
}
.landing h1 { font-size: clamp(38px, 6vw, 58px); font-weight: 500; line-height: 1.08; color: var(--cream); }
.landing-sub { font-size: 16.5px; line-height: 1.65; color: var(--sage); max-width: 480px; }
.landing-points { display: flex; flex-direction: column; gap: 14px; }
.landing-point { display: flex; align-items: flex-start; gap: 11px; font-size: 14.5px; line-height: 1.5; color: #d8e2d8; }
.landing-point svg { margin-top: 2px; flex-shrink: 0; }
