@charset "UTF-8";
/* Merribee — Christmas look. Scoped to [data-theme="christmas"] on <html> (set by js/theme-boot.js).
   Light and cosy: a snowy village illustration fixed behind everything under a soft cream wash,
   solid cream cards with warm shadows, cocoa-brown ink and a flat Christmas-red accent.
   The palette tokens live in styles.css; this file adds the scenery, the wordmark, the bee
   stickers and the few components that look different here. */

:root[data-theme="christmas"] {
  --halo: 0 0 2px rgba(251, 241, 236, 0.95), 0 0 8px rgba(251, 241, 236, 0.9), 0 0 16px rgba(251, 241, 236, 0.6);
}

/* ---------- background: village illustration + cream wash ---------- */

/* A fixed layer rather than background-attachment: fixed (broken/janky on iOS Safari).
   100lvh so it doesn't jump when mobile browser bars show/hide. */
[data-theme="christmas"] body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(251, 241, 236, 0.2) 0%, rgba(251, 241, 236, 0.45) 35%, rgba(251, 241, 236, 0.55) 100%),
    var(--bg) url("/img/christmas-bg.jpg") center top / cover no-repeat;
}

/* Signed-in pages on narrow screens have their own little bee next to the wordmark, so slide
   the portrait picture up until its big bee (top ~22%) is off-screen. */
@media (max-width: 899.98px) {
  [data-theme="christmas"] body:has(.topbar)::before {
    top: -32vh;
    top: -32lvh;
    height: 132vh;
    height: 132lvh;
  }
}

/* Wide screens: the landscape village across the whole page (no blur). */
@media (min-width: 900px) {
  [data-theme="christmas"] body::before {
    background:
      linear-gradient(to bottom, rgba(251, 241, 236, 0.35) 0%, rgba(251, 241, 236, 0.5) 50%, rgba(251, 241, 236, 0.4) 100%),
      var(--bg) url("/img/christmas-bg-wide.jpg") center 40% / cover no-repeat;
  }
}

/* ---------- text straight on the scenery: brown ink with a faint cream halo ---------- */

[data-theme="christmas"] .page-head,
[data-theme="christmas"] .hero,
[data-theme="christmas"] .section-head,
[data-theme="christmas"] .person-head,
[data-theme="christmas"] .list-group-head,
[data-theme="christmas"] .back-link,
[data-theme="christmas"] .auth-tagline,
[data-theme="christmas"] .auth-switch,
[data-theme="christmas"] .legal-note,
[data-theme="christmas"] .view > .hint,
[data-theme="christmas"] .section > .hint,
[data-theme="christmas"] .share-alt {
  text-shadow: var(--halo);
}

/* secondary text that sits on the scenery is a touch stronger than inside cards */
[data-theme="christmas"] .page-head .lede,
[data-theme="christmas"] .auth-tagline,
[data-theme="christmas"] .auth-switch,
[data-theme="christmas"] .legal-note,
[data-theme="christmas"] .share-alt,
[data-theme="christmas"] .section > .hint {
  color: rgba(61, 36, 24, 0.82);
}

/* ---------- wordmark (img/wordmark.png) ---------- */

[data-theme="christmas"] .xmas-wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 4px;
  user-select: none;
}

[data-theme="christmas"] .wm-img {
  display: block;
  width: min(260px, 72vw);
  height: auto;
  filter: drop-shadow(0 0 10px rgba(251, 241, 236, 0.9));
}

[data-theme="christmas"] .auth-wordmark {
  margin-top: 20px;
}

/* Narrow screens use the portrait village, whose own bee flies across the top ~22% of the
   picture: start the wordmark just below it. (The picture is "cover"-scaled from the top, so
   the bee's bottom edge sits at about 22% of max(viewport height, 1.78 × viewport width).) */
@media (max-width: 899.98px) {
  [data-theme="christmas"] .auth-wordmark {
    margin-top: calc(max(23vh, 40vw) - 36px);
  }
}

[data-theme="christmas"] .home-wordmark {
  margin-top: 0;
}

[data-theme="christmas"] .home-wordmark .wm-img {
  width: min(200px, 56vw);
}

/* ---------- bee stickers ---------- */

/* small flying bee next to the wordmark on the signed-in home */
[data-theme="christmas"] .wm-bee {
  display: block;
  flex: none;
  width: 52px;
  height: auto;
  margin-top: -18px;
  transform: rotate(-6deg);
}

/* bee hugging a gift above the sign-in wordmark: only where the backdrop has no bee of its own
   (the wide village illustration) */
[data-theme="christmas"] .auth-bee {
  display: none;
}

@media (min-width: 900px) {
  [data-theme="christmas"] .auth-bee {
    display: block;
    width: 150px;
    height: auto;
    margin: 0 auto -14px;
    user-select: none;
  }

  [data-theme="christmas"] .auth-bee + .auth-wordmark {
    margin-top: 0;
  }
}

/* ---------- shell ---------- */

[data-theme="christmas"] .topbar {
  background: transparent;
  border-bottom: 0;
}

@media (max-width: 719.98px) {
  [data-theme="christmas"] .tabs {
    background: var(--surface);
    border-top: 0;
    box-shadow: 0 -4px 16px rgba(138, 75, 50, 0.1);
  }
}

[data-theme="christmas"] a.tab {
  color: var(--text-2);
}

[data-theme="christmas"] a.tab[aria-current="page"] {
  color: var(--accent-text);
}

@media (min-width: 720px) {
  [data-theme="christmas"] .tabs {
    margin-top: 12px;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  [data-theme="christmas"] .tab {
    border-radius: 999px;
  }

  [data-theme="christmas"] .tab:hover {
    background: var(--surface-2);
  }

  [data-theme="christmas"] .tab[aria-current="page"] {
    background: var(--accent-soft);
  }
}

/* ---------- cards ---------- */

[data-theme="christmas"] .card.muted-card {
  background: rgba(255, 251, 248, 0.8);
  border: 1.5px dashed rgba(61, 36, 24, 0.25);
}

[data-theme="christmas"] .avatar-stack .avatar {
  box-shadow: 0 0 0 2px var(--surface);
}

[data-theme="christmas"] .tone-0 { background: var(--pine); }
[data-theme="christmas"] .tone-1 { background: #a8661a; }
[data-theme="christmas"] .tone-2 { background: #4f6d9a; }
[data-theme="christmas"] .tone-3 { background: #8a4f6e; }
[data-theme="christmas"] .tone-4 { background: #5d7a45; }
[data-theme="christmas"] .tone-5 { background: var(--red); }

/* ---------- forms ---------- */

[data-theme="christmas"] .segmented label {
  border-radius: 10px;
  font-weight: 600;
}

[data-theme="christmas"] .segmented input:checked + label {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- toasts ---------- */

[data-theme="christmas"] .toast {
  border-radius: 999px;
  background: var(--ink);
  color: #fffbf8;
}

/* ---------- progress ---------- */

[data-theme="christmas"] .progress-fill {
  background: var(--bought);
}

/* ---------- Secret Santa ---------- */

/* the wrapped present you tap to open */
[data-theme="christmas"] .reveal-cover {
  gap: 6px;
  padding: 26px 16px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

[data-theme="christmas"] .reveal-cover:active {
  background: var(--accent-strong);
}

[data-theme="christmas"] .reveal-cover:focus-visible {
  outline-color: var(--ink);
}

[data-theme="christmas"] .reveal-emoji {
  font-size: 2.6rem;
}

[data-theme="christmas"] .reveal-cta {
  color: #fff;
  font-size: 1.2rem;
}

[data-theme="christmas"] .reveal-sub {
  color: rgba(255, 255, 255, 0.92);
}

[data-theme="christmas"] .reveal-open {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px rgba(217, 138, 30, 0.55), var(--shadow);
}

[data-theme="christmas"] .reveal-label {
  color: var(--warm-text);
}

[data-theme="christmas"] .reveal-person .avatar {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--honey);
}

/* ---------- sharing ---------- */

[data-theme="christmas"] .share-landing .auth-wordmark {
  margin-top: 12px;
}

[data-theme="christmas"] .share-eyebrow {
  color: var(--warm-text);
}

/* ---------- motion (skipped entirely under reduced motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  [data-theme="christmas"] .reveal-open {
    animation: xmas-fade-in 0.3s ease-out;
  }

  [data-theme="christmas"] .status.just-bought {
    animation: xmas-bought 0.4s ease-out;
  }
}

@keyframes xmas-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes xmas-bought {
  0% {
    transform: scale(0.96);
    opacity: 0.4;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (forced-colors: active) {
  [data-theme="christmas"] body::before {
    display: none;
  }
}
