:root {
  --pine: #0f2a1f;
  --pine-2: #163a2b;
  --pine-3: #1f4a37;
  --cream: #f6efe2;
  --cream-dim: #cfc6b4;
  --berry: #c8323c;
  --berry-2: #e04a52;
  --gold: #e5b85c;
  --radius: 18px;
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, #24543f 0%, transparent 70%),
    var(--pine);
  color: var(--cream);
  font: 16px/1.55 var(--body);
  min-height: 100vh;
}
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 9vw, 4.2rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.6rem; font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.hidden { display: none !important; }
.muted { color: var(--cream-dim); }
.small { font-size: .875rem; }
.center { text-align: center; }

.top, main, .foot { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.top { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 6px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--cream); text-decoration: none; }
.foot { padding-top: 40px; padding-bottom: 48px; color: var(--cream-dim); font-size: .85rem; text-align: center; }
.loading { padding: 80px 0; text-align: center; color: var(--cream-dim); }

section { margin: 28px 0; }
.card {
  background: var(--pine-2);
  border: 1px solid #ffffff14;
  border-radius: var(--radius);
  padding: 22px;
}
.hero { text-align: center; padding: 36px 0 8px; }
.hero .kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--berry-2); }
.hero .lede { font-size: 1.1rem; color: var(--cream-dim); max-width: 34em; margin: 0 auto 1.4em; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--pine-2); border-radius: 14px; padding: 14px 10px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 1.8rem; color: var(--gold); }
.stat span { font-size: .78rem; color: var(--cream-dim); }

.steps { counter-reset: s; display: grid; gap: 12px; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before {
  content: counter(s); flex: 0 0 32px; height: 32px; border-radius: 50%;
  background: var(--berry); color: #fff; display: grid; place-items: center; font-weight: 700;
}

.tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tier {
  position: relative; background: var(--pine-2); border: 2px solid transparent; border-radius: 14px;
  padding: 14px; cursor: pointer; display: block;
}
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier:has(input:checked) { border-color: var(--gold); background: var(--pine-3); }
.tier:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.tier .em { font-size: 1.6rem; }
.tier strong { display: block; margin-top: 4px; }
.tier small { color: var(--cream-dim); }

.gifts { display: grid; gap: 8px; padding: 0; list-style: none; }
.gifts li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; background: var(--pine-2); border-radius: 12px; padding: 10px 12px; }
.gifts .n { font-family: var(--display); font-weight: 800; color: var(--gold); font-size: 1.2rem; text-align: center; }
.gifts .g { font-weight: 600; }
.gifts .q { color: var(--cream-dim); font-size: .9rem; }

form { display: grid; gap: 12px; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input[type=email], input[type=text], input[type=url], input[type=number], select {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid #ffffff26;
  background: #0b2018; color: var(--cream); font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 22px; height: 22px; accent-color: var(--berry); margin-top: 1px; }

.btn {
  appearance: none; border: 0; border-radius: 999px; padding: 14px 22px; font: 700 1rem var(--body);
  background: var(--berry); color: #fff; cursor: pointer; text-align: center; text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--berry-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid #ffffff40; }
.btn.gold { background: var(--gold); color: var(--pine); }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 auto; }
.link { background: none; border: 0; color: var(--cream-dim); font: inherit; cursor: pointer; text-decoration: underline; }

.today { text-align: center; }
.today .day { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .8rem; }
.today .target { font-family: var(--display); font-size: 3rem; font-weight: 800; margin: 6px 0; }
.today .gift { font-family: var(--display); font-size: 1.3rem; margin-bottom: 4px; }
.today form { text-align: left; }
.quest { background: #0b2018; border-radius: 12px; padding: 12px 14px; text-align: left; margin: 14px 0; }
.quest b { color: var(--gold); }
.notice { background: #e5b85c1f; border: 1px solid #e5b85c66; border-radius: 12px; padding: 12px 14px; margin: 12px 0; text-align: left; }
.notice.bad { background: #c8323c22; border-color: #c8323c88; }

.tree { display: block; margin: 0 auto; width: min(260px, 70vw); height: auto; }
.tree .bauble { transition: fill .4s, filter .4s; }
.tree .lit { filter: drop-shadow(0 0 6px #ffd98a); }

.progress-meta { display: flex; justify-content: center; gap: 18px; margin-top: 8px; flex-wrap: wrap; }
.progress-meta b { font-family: var(--display); font-size: 1.5rem; color: var(--gold); display: block; text-align: center; }
.progress-meta span { font-size: .78rem; color: var(--cream-dim); }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { flex: 1; padding: 10px; border-radius: 999px; border: 1px solid #ffffff30; background: transparent; color: var(--cream); font: 600 .9rem var(--body); cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--cream); color: var(--pine); }
table.lb { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lb td, .lb th { padding: 10px 6px; border-bottom: 1px solid #ffffff14; text-align: left; }
.lb th { font-size: .75rem; color: var(--cream-dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.lb td.num, .lb th.num { text-align: right; font-variant-numeric: tabular-nums; }
.lb tr.me td { color: var(--gold); font-weight: 700; }
.lb .flock { display: block; font-size: .78rem; color: var(--cream-dim); font-weight: 400; }

.code { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; letter-spacing: .2em; color: var(--gold); }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--cream); color: var(--pine); padding: 12px 18px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 10px 30px #0006; max-width: calc(100vw - 40px); z-index: 10;
}
.toast.bad { background: var(--berry); color: #fff; }

@media (max-width: 420px) {
  .tiers { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.daylist { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; }
.daylist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid #ffffff14; }
.daylist .right { white-space: nowrap; color: var(--gold); font-weight: 700; }
.daylist .link { text-decoration: none; font-size: 1.2rem; margin-left: 6px; }
