@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Caveat';
  src: url('/fonts/caveat-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --forest: #0c211b;
  --forest-2: #17382d;
  --gold: #ddbb79;
  --wine: #963f4b;
  --paper: #fff3dc;
  --mist: #a6bdb0;
  --ink: #0c211b;
  --snow: #f4faf7;
  --berry: #d23a4e;
  --cranberry: #a3313f;
  --pine: #23664a;
  --walnut: #80502e;
  --frost: #2a6475;
  --honey: #a87a26;
  --radius: 14px;
  --serif: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 150px;
  background:
    url('/img/hills.svg') center bottom / max(1200px, 100%) auto no-repeat,
    radial-gradient(ellipse 70% 40% at 50% -6%, rgba(221, 187, 121, 0.18), transparent 70%),
    radial-gradient(circle at 50% -10%, var(--forest-2), var(--forest) 60%);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

h2 {
  font-size: 1.4rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--gold);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

[tabindex='-1']:focus {
  outline: none;
}

@media (max-width: 399px) {
  .nav a {
    padding: 0 6px;
  }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--gold);
  color: var(--forest);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.brand-mark {
  width: 22px;
  height: 30px;
  border: 3px solid var(--gold);
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}

.nav a {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--mist);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--paper);
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(31, 70, 56, 0.78), rgba(23, 56, 45, 0.62));
  border: 1px solid rgba(221, 187, 121, 0.22);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  margin: 14px 0 22px;
  box-shadow: inset 0 1px 0 rgba(255, 243, 220, 0.06), 0 16px 36px rgba(0, 0, 0, 0.25);
}

/* Snow resting on the top edge of every card. */
.card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 12px;
  right: 12px;
  height: 14px;
  background: url('/img/snowcap.svg') left top / 120px 14px repeat-x;
  pointer-events: none;
}

.muted {
  color: var(--mist);
}

.eyebrow {
  color: var(--gold);
  font-family: var(--hand);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 4px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.stack > * + * {
  margin-top: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  font-weight: 600;
}

.hint {
  color: var(--mist);
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--mist);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ecd39c, var(--gold));
  color: var(--forest);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(221, 187, 121, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(221, 187, 121, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--mist);
}

.btn--danger {
  background: var(--wine);
  color: var(--paper);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.notice {
  border-left: 4px solid var(--gold);
  background: rgba(221, 187, 121, 0.12);
  padding: 12px 14px;
  border-radius: 8px;
  margin: 0 0 14px;
}

.notice--error {
  border-left-color: #e0808c;
  background: rgba(150, 63, 75, 0.35);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(166, 189, 176, 0.2);
}

.list > li:last-child {
  border-bottom: 0;
}

/* "My calendars" list: each calendar is a tappable row with a little house icon. */
.cal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.cal-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(221, 187, 121, 0.25);
  background: linear-gradient(135deg, rgba(255, 243, 220, 0.08), rgba(12, 33, 27, 0.35));
  color: var(--paper);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.cal-item:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  background-color: rgba(221, 187, 121, 0.08);
}

.cal-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 35%, #b8414f, var(--cranberry) 70%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cal-list li:nth-child(3n + 2) .cal-icon {
  background: radial-gradient(circle at 50% 35%, #2f7d5b, var(--pine) 70%);
}

.cal-list li:nth-child(3n + 3) .cal-icon {
  background: radial-gradient(circle at 50% 35%, #357a8c, var(--frost) 70%);
}

.cal-icon img {
  width: 40px;
  height: 40px;
}

.cal-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.cal-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.cal-meta {
  color: var(--mist);
  font-size: 0.9rem;
}

.cal-go {
  flex: none;
  width: 10px;
  height: 10px;
  margin: 0 8px 0 4px;
  border-top: 2.5px solid var(--gold);
  border-right: 2.5px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.cal-item:hover .cal-go {
  transform: translateX(3px) rotate(45deg);
}

.calendar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: var(--mist);
  font-size: 0.95rem;
}

.chip {
  padding: 4px 12px;
  border: 1px solid rgba(221, 187, 121, 0.3);
  border-radius: 999px;
  background: rgba(12, 33, 27, 0.55);
  color: var(--paper);
  font-size: 0.85rem;
}

/* Calendar stage: open, centered scene instead of a plain card. */
.stage {
  position: relative;
  margin: 8px 0 28px;
  text-align: center;
}

.stage h1 {
  margin: 4px 0 12px;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  text-shadow: 0 2px 18px rgba(221, 187, 121, 0.35);
}

.stage .calendar-meta {
  justify-content: center;
}

.stage .progress {
  max-width: 420px;
  margin: 14px auto 0;
}

.countdown {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 6px auto 4px;
  padding: 12px 18px 14px;
  border: 1px solid rgba(221, 187, 121, 0.35);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(163, 49, 63, 0.35), rgba(12, 33, 27, 0.6));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 243, 220, 0.1);
}

.countdown-label {
  color: var(--gold);
  font-family: var(--hand);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}

.countdown-clock {
  display: flex;
  gap: 8px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 6px 4px 5px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 -3px 0 rgba(128, 80, 46, 0.25);
}

.countdown-value {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown-name {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cranberry);
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(166, 189, 176, 0.22);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--berry) 0 8px, var(--snow) 8px 16px);
  animation: candy 1600ms linear infinite;
}

@keyframes candy {
  to {
    background-position: 22.6px 0;
  }
}

/* The advent house that holds the 24 doors. */
.house {
  position: relative;
  max-width: 780px;
  margin: 34px auto 18px;
}

/* The roof overhangs the walls on both sides, like real eaves. */
.house-roof {
  position: relative;
  z-index: 1;
  height: clamp(70px, 14vw, 130px);
  margin: 0 clamp(-44px, -4vw, -12px);
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.45));
}

.house-roof::before,
.house-roof::after {
  content: '';
  position: absolute;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.house-roof::before {
  inset: -8px 0 0;
  background: var(--snow);
}

.house-roof::after {
  inset: 7px 12px 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(0, 0, 0, 0.22) 13px 15px),
    linear-gradient(180deg, #b8404f, #7d2431);
}

.house-star {
  position: absolute;
  top: -34px;
  left: calc(50% - 30px);
  z-index: 1;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 221, 140, 0.75), rgba(221, 187, 121, 0) 68%);
  animation: star-glow 2600ms ease-in-out infinite;
}

.house-star::before {
  content: '';
  position: absolute;
  inset: 12px;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: linear-gradient(180deg, #fff1c4, #f0c35a);
}

@keyframes star-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

.house-body {
  position: relative;
  padding: 18px 14px 22px;
  border: 3px solid #3a2213;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0, rgba(255, 210, 130, 0.18), transparent 70%),
    repeating-linear-gradient(0deg, #5b3720 0 26px, #4a2c18 26px 28px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

.house-body::after {
  content: '';
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: -10px;
  height: 14px;
  border-radius: 8px;
  background: var(--snow);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.house .doors {
  margin: 0;
}

/* String lights: a wire with bulbs, plus two glow layers that twinkle in turn. */
.garland {
  position: relative;
  height: 36px;
  background: url('/img/garland.svg') left top / 200px 36px repeat-x;
  pointer-events: none;
}

.garland::before,
.garland::after {
  content: '';
  position: absolute;
  inset: 0;
  background-size: 200px 36px;
  background-repeat: repeat-x;
  animation: twinkle 2400ms ease-in-out infinite alternate;
}

.garland::before {
  background-image:
    radial-gradient(circle at 25px 24px, rgba(255, 92, 110, 0.7), transparent 14px),
    radial-gradient(circle at 125px 24px, rgba(255, 210, 110, 0.7), transparent 14px);
}

.garland::after {
  background-image:
    radial-gradient(circle at 75px 26px, rgba(110, 220, 160, 0.7), transparent 14px),
    radial-gradient(circle at 175px 26px, rgba(120, 190, 255, 0.7), transparent 14px);
  animation-delay: -1200ms;
}

@keyframes twinkle {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}

.garland--eave {
  margin: -8px 0 -14px;
  z-index: 2;
}

.doors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 10px;
  margin: 18px 0;
  perspective: 900px;
}

@media (min-width: 768px) {
  .doors {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px 14px;
  }
}

.door {
  --paint: #a3313f;
  --paint-dark: #6d1f2a;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  min-height: 72px;
  padding: 8px 4px;
  border: 2px solid #2d1a0e;
  border-radius: 14px 14px 6px 6px;
  background:
    radial-gradient(circle at 82% 56%, #ffe7a6 0 2px, #c89a3c 3px 4px, transparent 5px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 49.5%, rgba(0, 0, 0, 0.14) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(170deg, var(--paint), var(--paint-dark));
  box-shadow: inset 0 1px 0 rgba(255, 243, 220, 0.25), inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 6px 14px rgba(0, 0, 0, 0.35);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
  transform-origin: left center;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.door:nth-child(5n + 2) {
  --paint: #2b7552;
  --paint-dark: #17432f;
}

.door:nth-child(5n + 3) {
  --paint: #8d5a35;
  --paint-dark: #55321b;
}

.door:nth-child(5n + 4) {
  --paint: #2f7386;
  --paint-dark: #1a4450;
}

.door:nth-child(5n + 5) {
  --paint: #b8862c;
  --paint-dark: #7a5517;
}

.door:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.door::before {
  content: '';
  position: absolute;
  inset: 7px 7px 6px;
  border: 1px solid rgba(255, 243, 220, 0.2);
  border-radius: 9px 9px 3px 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.door-deco {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.door-number {
  position: relative;
  z-index: 1;
  min-width: 1.9em;
  padding: 4px 6px 3px;
  border-radius: 7px;
  background: var(--paper);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(128, 80, 46, 0.35);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.door-state {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(12, 33, 27, 0.55);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--paper);
}

@media (max-width: 479px) {
  .door-number {
    font-size: 1.1rem;
  }

  .door-state {
    font-size: 0.55rem;
    letter-spacing: 0.02em;
    padding: 1px 4px;
  }
}

/* Sealed: wrapped with a gold ribbon and a bow. */
.door--sealed .door-deco {
  background:
    linear-gradient(90deg, transparent calc(50% - 5px), #f3d68e calc(50% - 5px) calc(50% - 3px), #d6aa4c calc(50% - 3px) calc(50% + 3px), #f3d68e calc(50% + 3px) calc(50% + 5px), transparent calc(50% + 5px)),
    linear-gradient(0deg, transparent calc(50% - 5px), #d6aa4c calc(50% - 5px) calc(50% + 5px), transparent calc(50% + 5px));
}

.door--sealed .door-deco::before {
  content: '';
  position: absolute;
  top: -7px;
  left: calc(50% - 15px);
  width: 30px;
  height: 16px;
  background:
    radial-gradient(circle at 50% 55%, #f5dc9a 0 3px, transparent 4px),
    radial-gradient(ellipse 9px 6px at 30% 50%, #d6aa4c 0 98%, transparent),
    radial-gradient(ellipse 9px 6px at 70% 50%, #d6aa4c 0 98%, transparent);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

/* Empty: still locked, quietly waiting for notes. */
.door--empty {
  filter: saturate(0.55) brightness(0.82);
}

.door--empty:hover {
  filter: saturate(0.75) brightness(0.95);
}

/* Ready: a wreath around the number, glowing until opened. */
.door--ready {
  border-color: #f0cf83;
  animation: door-glow 2800ms ease-in-out infinite;
}

.door--ready .door-number {
  display: grid;
  place-items: center;
  width: 2.7em;
  height: 2.7em;
  padding: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 18% 30%, #e8384f 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 86% 36%, #e8384f 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 30% 86%, #e8384f 0 2.5px, transparent 3.5px),
    radial-gradient(circle, var(--paper) 0 50%, transparent 51%),
    repeating-conic-gradient(#2f8a57 0 12deg, #1d5f3b 12deg 24deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.door--ready .door-number::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: calc(50% - 10px);
  width: 20px;
  height: 10px;
  background:
    radial-gradient(ellipse 6px 4px at 28% 50%, #e8384f 0 98%, transparent),
    radial-gradient(ellipse 6px 4px at 72% 50%, #e8384f 0 98%, transparent);
}

.door--ready .door-state {
  margin-top: 8px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

@keyframes door-glow {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(240, 207, 131, 0.35), 0 6px 14px rgba(0, 0, 0, 0.35);
  }
  50% {
    box-shadow: 0 0 28px rgba(240, 207, 131, 0.8), 0 6px 14px rgba(0, 0, 0, 0.35);
  }
}

/* Opened: warm light inside, with the door slab swung ajar. */
.door--opened {
  border-color: #2d1a0e;
  background: radial-gradient(ellipse at 60% 45%, #ffe2a1, #e0a24e 45%, #7a4a20 100%);
}

.door--opened::before {
  inset: 0 auto 0 0;
  width: 24%;
  border: 0;
  border-radius: 12px 0 0 4px;
  background: linear-gradient(90deg, var(--paint-dark), var(--paint));
  box-shadow: 3px 0 8px rgba(0, 0, 0, 0.35);
}

.door--opened .door-number {
  background: rgba(255, 243, 220, 0.85);
}

.door--opened .door-state {
  background: rgba(90, 52, 22, 0.75);
}

.door--mine::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 6px;
  z-index: 2;
  width: 14px;
  height: 14px;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: #ffd970;
}

.door.is-opening {
  animation: door-open 1450ms ease-in-out forwards;
}

.door.is-closing {
  animation: door-close 700ms ease-in-out forwards;
}

@keyframes door-open {
  from {
    transform: perspective(900px) rotateY(0deg);
  }
  to {
    transform: perspective(900px) rotateY(-70deg);
  }
}

@keyframes door-close {
  from {
    transform: perspective(900px) rotateY(-70deg);
  }
  to {
    transform: perspective(900px) rotateY(0deg);
  }
}

dialog.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, #fff8e8, var(--paper) 40%);
  color: var(--ink);
  overflow: auto;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  dialog.sheet {
    margin: auto;
    border-radius: 16px;
  }
}

dialog.sheet::backdrop {
  background: rgba(12, 33, 27, 0.7);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 0 20px;
}

.sheet-head h2 {
  margin: 0;
  color: var(--forest);
}

.sheet-body {
  padding: 8px 20px 24px;
}

.sheet-body .muted {
  color: #4b5f57;
}

/* Ghost buttons default to light text for dark pages; the sheet is light paper. */
dialog.sheet .btn--ghost {
  color: var(--forest);
  border-color: rgba(12, 33, 27, 0.35);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

dialog.sheet .btn--ghost:not(:disabled):hover {
  border-color: var(--forest);
  background: #fff;
  box-shadow: 0 4px 12px rgba(12, 33, 27, 0.12);
}

.letter {
  position: relative;
  margin: 12px 0;
  padding: 16px 18px;
  border-radius: 10px;
  background: linear-gradient(170deg, #fffdf6, #fbf1d9);
  border: 1px solid #e6d7b0;
  box-shadow: 0 6px 18px rgba(12, 33, 27, 0.12);
  font-family: var(--hand);
  font-size: 1.45rem;
  line-height: 1.3;
  color: #2b2116;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: letter-rise 600ms ease-out both;
}

.letter:not(.letter--prompt)::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c76873, var(--wine) 70%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.letter .by {
  display: block;
  line-height: 1.4;
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: #4b5f57;
}

.letter--prompt {
  border-style: dashed;
  background: #f7f1df;
}

@keyframes letter-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.counter {
  align-self: end;
  font-size: 0.85rem;
  color: #4b5f57;
}

.invite-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invite-box input {
  flex: 1 1 260px;
  font-size: 0.9rem;
}

.center {
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.public main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.public section {
  margin: 32px 0;
}

.public .hero {
  position: relative;
  isolation: isolate;
  padding: 48px 0 24px;
  text-align: center;
}

.public .hero::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  z-index: -1;
  width: min(560px, 100%);
  height: 440px;
  transform: translateX(-50%);
  border-radius: 999px 999px 40px 40px;
  background: radial-gradient(ellipse at 50% 55%, rgba(221, 187, 121, 0.32), rgba(23, 56, 45, 0.2) 45%, transparent 70%);
  pointer-events: none;
}

.public .hero .brand-mark {
  margin: 0 auto 16px;
}

.public .cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.public .faq dt {
  font-weight: 600;
  margin-top: 16px;
  color: var(--gold);
}

.public .faq dd {
  margin: 4px 0 0;
}

.public .topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 16px 8px;
  flex-wrap: wrap;
}

.public .nav {
  flex-wrap: nowrap;
}

@media (max-width: 479px) {
  .public .nav {
    gap: 0;
    margin-left: -8px;
  }

  .public .nav a {
    padding: 0 8px;
    font-size: 0.95rem;
  }
}

@media (max-width: 359px) {
  .public .nav a {
    padding: 0 6px;
    font-size: 0.85rem;
  }
}

.public footer {
  max-width: 1080px;
  margin: 32px auto 0;
  padding: 16px;
  border-top: 1px solid rgba(221, 187, 121, 0.18);
  color: var(--mist);
  font-size: 0.9rem;
}

.public footer nav a {
  margin-right: 14px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 243, 220, 0.7), transparent),
    radial-gradient(1px 1px at 72% 9%, rgba(255, 243, 220, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 40% 62%, rgba(221, 187, 121, 0.6), transparent),
    radial-gradient(1px 1px at 88% 48%, rgba(255, 243, 220, 0.6), transparent),
    radial-gradient(1px 1px at 22% 84%, rgba(255, 243, 220, 0.45), transparent),
    radial-gradient(1px 1px at 60% 90%, rgba(255, 243, 220, 0.4), transparent);
}

.public .hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.2rem);
}

.h1-line {
  display: block;
}

.public .lead {
  max-width: 36em;
  margin: 0 auto;
  font-size: 1.15rem;
  opacity: 0.95;
}

.public .hero .cta .btn {
  min-height: 48px;
  padding: 0 28px;
  font-size: 1.05rem;
}

.public section h2 {
  position: relative;
  padding-top: 16px;
}

.public section h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.public .steps,
.public .audience {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.public .steps {
  counter-reset: step;
}

.public .steps li,
.public .audience li {
  padding: 16px 18px;
  background: rgba(23, 56, 45, 0.6);
  border: 1px solid rgba(166, 189, 176, 0.2);
  border-radius: var(--radius);
}

.public .steps li {
  position: relative;
  counter-increment: step;
  padding: 96px 18px 18px;
  background:
    url('/img/icon-house.svg') 18px 18px / 64px 64px no-repeat,
    linear-gradient(180deg, rgba(31, 70, 56, 0.78), rgba(23, 56, 45, 0.6));
  border-color: rgba(221, 187, 121, 0.25);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.public .steps li:nth-child(2) {
  background-image: url('/img/icon-envelope.svg'), linear-gradient(180deg, rgba(31, 70, 56, 0.78), rgba(23, 56, 45, 0.6));
}

.public .steps li:nth-child(3) {
  background-image: url('/img/icon-note.svg'), linear-gradient(180deg, rgba(31, 70, 56, 0.78), rgba(23, 56, 45, 0.6));
}

.public .steps li:nth-child(4) {
  background-image: url('/img/icon-gift.svg'), linear-gradient(180deg, rgba(31, 70, 56, 0.78), rgba(23, 56, 45, 0.6));
}

.public .steps li::before {
  content: counter(step);
  position: absolute;
  right: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d0606e, var(--cranberry) 70%);
  border: 2px solid var(--gold);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 700;
}

.public .steps strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 1.12rem;
}

@media (min-width: 600px) {
  .public .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .public .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.public .audience li {
  position: relative;
  padding-left: 62px;
}

/* A hanging bauble as the list bullet. */
.public .audience li::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0 2px, #ff8a96 3px, var(--cranberry) 60%, #5f1720);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.public .audience li::after {
  content: '';
  position: absolute;
  left: 27px;
  top: 12px;
  width: 10px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(90deg, #b8862c, #f3d68e, #b8862c);
}

.public .audience li:nth-child(4n + 2)::before {
  background: radial-gradient(circle at 34% 30%, #fff 0 2px, #9be8bd 3px, var(--pine) 60%, #103222);
}

.public .audience li:nth-child(4n + 3)::before {
  background: radial-gradient(circle at 34% 30%, #fff 0 2px, #ffe7a6 3px, var(--honey) 60%, #5a3f0c);
}

.public .audience li:nth-child(4n + 4)::before {
  background: radial-gradient(circle at 34% 30%, #fff 0 2px, #a9dcff 3px, var(--frost) 60%, #0f2c35);
}

.public .steps strong,
.public .audience strong {
  color: var(--gold);
}

.public main > section:not(.hero) {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.public main > section:has(.steps) {
  max-width: 1080px;
}

.public .hero-points {
  display: grid;
  gap: 8px;
  margin: 8px 0 14px;
  padding: 0;
  list-style: none;
}

.public .hero-points li {
  position: relative;
  padding-left: 28px;
}

.public .hero-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 18px;
  height: 18px;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: var(--gold);
}

.public .hero--split .hero-art {
  margin-top: 40px;
}

.public .house--demo .door {
  cursor: default;
  min-height: 0;
}

.public .house--demo .doors {
  gap: 10px;
}

@media (min-width: 960px) {
  .public .hero--split {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 48px;
    align-items: center;
    text-align: left;
  }

  .public .hero--split .lead {
    margin: 0;
  }

  .public .hero--split .cta {
    justify-content: flex-start;
  }

  .public .hero--split .hero-points {
    justify-items: start;
  }

  .public .hero--split .hero-art {
    margin-top: 30px;
  }

  .public .house--demo .doors {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.public .hero-points li {
  text-align: left;
}

@media (max-width: 959px) {
  .public .hero-points {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }
}

.public .hero-icons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.public .hero-icons img {
  width: clamp(44px, 12vw, 64px);
  height: auto;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.public .hero-icons img:nth-child(odd) {
  transform: rotate(-6deg) translateY(4px);
}

.public .hero-icons img:nth-child(even) {
  transform: rotate(5deg);
}

.public .promise {
  position: relative;
  padding: 24px 22px 22px 112px;
  border: 1px solid rgba(221, 187, 121, 0.3);
  border-radius: var(--radius);
  background:
    url('/img/icon-envelope.svg') 22px 26px / 68px 68px no-repeat,
    linear-gradient(135deg, rgba(163, 49, 63, 0.3), rgba(23, 56, 45, 0.7));
}

@media (max-width: 599px) {
  .public .promise {
    padding: 100px 20px 20px;
  }
}

.public .audience strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

@media (min-width: 600px) {
  .public .audience {
    grid-template-columns: 1fr 1fr;
  }
}

.public .faq {
  padding: 20px 22px;
  background: rgba(23, 56, 45, 0.6);
  border: 1px solid rgba(221, 187, 121, 0.18);
  border-radius: var(--radius);
}

.public .faq dt {
  font-size: 1.02rem;
}

.public .cta-band {
  text-align: center;
  padding: 28px 20px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(221, 187, 121, 0.3);
  background: radial-gradient(circle at 50% 0, rgba(221, 187, 121, 0.18), transparent 60%), rgba(23, 56, 45, 0.7);
}

.public .cta-band h2::before {
  left: 50%;
  transform: translateX(-50%);
}


/* Seasonal pill on the homepage hero. */
.public .season-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(221, 187, 121, 0.35);
  border-radius: 999px;
  background: rgba(12, 33, 27, 0.55);
  font-size: 0.92rem;
}

@media (max-width: 479px) {
  .public .season-pill {
    justify-content: center;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 0.86rem;
  }
}

.public .season-pill span {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--berry);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Occasion cards on the homepage. */
.public .occasions {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

@media (min-width: 700px) {
  .public .occasions {
    grid-template-columns: 1.3fr 1fr;
  }
}

.public .occasion {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px dashed rgba(166, 189, 176, 0.45);
  background: rgba(23, 56, 45, 0.45);
}

.public .occasion--live {
  border: 1px solid rgba(221, 187, 121, 0.45);
  background:
    url('/img/icon-house.svg') right 16px top 16px / 56px 56px no-repeat,
    linear-gradient(135deg, rgba(163, 49, 63, 0.35), rgba(23, 56, 45, 0.75));
}

.public .occasion strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  padding-right: 64px;
}

.public .occasion-tag {
  justify-self: start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--pine);
  color: var(--snow);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.public .occasion-tag--soon {
  background: rgba(166, 189, 176, 0.2);
  color: var(--mist);
}

.public .occasion a {
  color: var(--gold);
  font-weight: 700;
}

/* Breadcrumb on landing pages. */
.public .crumbs {
  font-size: 0.88rem;
  opacity: 0.8;
}

.public .crumbs a {
  color: var(--mist);
}

/* December timeline. */
.public .timeline {
  list-style: none;
  margin: 16px 0 0;
  padding: 0 0 0 22px;
  border-left: 2px dashed rgba(221, 187, 121, 0.45);
  display: grid;
  gap: 16px;
}

.public .timeline li {
  position: relative;
  display: grid;
  gap: 2px;
}

.public .timeline li::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--berry);
  box-shadow: 0 0 0 3px var(--forest), 0 0 10px rgba(210, 58, 78, 0.7);
}

.public .timeline strong {
  font-family: var(--hand);
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--gold);
}

/* 24 note ideas, drawn as little numbered tags. */
.public .ideas {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

@media (min-width: 600px) {
  .public .ideas {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .public .ideas {
    grid-template-columns: repeat(3, 1fr);
  }
}

.public .ideas li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.public .idea-day {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--cranberry);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 700;
}

.public .ideas li:nth-child(3n + 2) .idea-day {
  background: var(--pine);
}

.public .ideas li:nth-child(3n + 3) .idea-day {
  background: var(--honey);
}

/* Comparison table. */
.public .table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(221, 187, 121, 0.25);
}

.public .compare {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: rgba(23, 56, 45, 0.55);
  font-size: 0.95rem;
}

.public .compare th,
.public .compare td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(166, 189, 176, 0.15);
}

.public .compare thead th {
  font-family: var(--serif);
  color: var(--gold);
}

.public .compare tbody th {
  font-weight: 700;
}

.public .compare td:last-child,
.public .compare th:last-child {
  background: rgba(163, 49, 63, 0.28);
  color: var(--snow);
  font-weight: 700;
}

.public .compare tbody tr:last-child > * {
  border-bottom: 0;
}

/* Gently falling snow, drawn as three tiled dot layers that each drift exactly one tile per loop. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 30px 40px, rgba(255, 255, 255, 0.8) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 130px 120px, rgba(255, 255, 255, 0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 70px 200px, rgba(255, 255, 255, 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 210px 60px, rgba(255, 255, 255, 0.55) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 160px 280px, rgba(255, 255, 255, 0.7) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 300px 140px, rgba(255, 255, 255, 0.5) 0 1.5px, transparent 2.5px);
  background-size: 180px 180px, 180px 180px, 260px 260px, 260px 260px, 360px 360px, 360px 360px;
  animation: snowfall 24s linear infinite;
}

@keyframes snowfall {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  to {
    background-position: 0 180px, 0 180px, 0 260px, 0 260px, 0 360px, 0 360px;
  }
}

.garland--top {
  margin-top: -4px;
}
