/* Smart Abstract corporate design (see smart-abstract-website/CLAUDE.md):
   orange #E5691E, blue #376EA0 / #295378 / #1F3E5A, text #3E3E3E,
   Source Sans Pro 400/600. Dot pattern as a nod to the logo. */
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-pro-v21-latin-ext_latin-regular.woff2") format("woff2"),
       url("fonts/source-sans-pro-v21-latin-ext_latin-regular.woff") format("woff");
}
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-pro-v21-latin-ext_latin-600.woff2") format("woff2"),
       url("fonts/source-sans-pro-v21-latin-ext_latin-600.woff") format("woff");
}

/* Heading: Dancing Script (SIL Open Font License 1.1, see fonts/OFL-DancingScript.txt).
   Variable font 400–700, self-hosted, nothing is loaded from Google. */
@font-face {
  font-family: "Dancing Script";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dancing-script-latin.woff2") format("woff2");
}

:root {
  --sa-orange: #e5691e;
  --sa-orange-dark: #ac4f17;
  --sa-orange-light: #fff9f6;
  --sa-navy: #376ea0;
  --sa-navy-light: #4a86b8;
  --sa-navy-dark: #295378;
  --sa-night: #1f3e5a;
  --sa-night-deep: #172f45;
  --sa-ice: #ecf3f8;
  --sa-bg: #ffffff;
  --sa-bg-soft-2: #f2f2f2;
  --sa-text: #3e3e3e;
  --sa-text-muted: #8b8b8b;
  --sa-border: #e4e4e4;
  --sa-radius: 4px;
  --shadow: 0 2px 3px rgba(219, 219, 219, 1);
  --page-bg: #d8e3ee;   /* dark enough for white snowflakes to show */
  --font: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--sa-text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sa-navy); }

/* ---------- Preview bar ---------- */
.preview-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  padding: 8px 16px;
  background: #fff6db; border-bottom: 1px solid #ecd9a0;
  font-size: 13px;
}
.preview-bar[hidden] { display: none; }
.preview-bar input { font: inherit; padding: 2px 6px; margin-left: 6px; }
.link-btn {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--sa-navy); text-decoration: underline; cursor: pointer;
}

/* ---------- Header ---------- */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(16px, calc((100% - 880px) / 2));
  background: var(--sa-bg);
  box-shadow: 0 1px 0 var(--sa-border);
}
.brand { display: block; line-height: 0; }
.brand img { width: clamp(150px, 30vw, 220px); height: auto; }
.topbar-link {
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--sa-navy); text-decoration: none;
}
.topbar-link:hover { color: var(--sa-orange); }

/* ---------- Hero: ice blue with hanging baubles ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 50% 40%, rgba(255, 255, 255, .35), transparent 70%),
    linear-gradient(180deg, #a9c3dc, #c1d4e6 75%);
  padding: 44px 16px 104px;
  text-align: center;
}
/* Snow: fixed layer over the whole window. z-index 1 = above the backgrounds
   (page, header, wave) but below the texts (.hero-inner), the top bar and the
   calendar card (.page, z-index 2). */
.snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 580px; margin: 0 auto; }
.hero h1 {
  margin: 0 0 6px;
  font-family: "Dancing Script", var(--font);
  font-size: clamp(38px, 6.2vw, 58px);
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.15;
  color: var(--sa-navy);
}
.hero h1 span { color: var(--sa-orange); }
.hero-sub {
  margin: 0 auto;
  max-width: 540px;
  font-size: 17px; line-height: 1.55;
  color: #3d5871;
}
.hero-status {
  margin-top: 20px;
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center;
  min-height: 42px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  color: var(--sa-navy);
  background: #fff;
  box-shadow: 0 6px 18px -8px rgba(31, 62, 90, .3);
}
.hero-status:empty { visibility: hidden; }
.countdown { display: inline-flex; gap: 14px; font-variant-numeric: tabular-nums; }
.countdown b { font-size: 18px; color: var(--sa-orange); }
.countdown small { color: var(--sa-text-muted); font-weight: 400; margin-left: 2px; }

.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; height: 70px;
  fill: var(--page-bg);
}

/* Reindeer (silhouette): runs along the lower edge of the header (the wave) from left
   to right, behind the calendar card in the middle. app.js sets position and tilt per
   frame; here only the look, the bobbing and the leg movement. */
.reindeer {
  position: absolute; left: 0; top: 0; z-index: 1;
  width: 120px; height: 90px;
  color: #2c5a80;
  opacity: .45;
  pointer-events: none;
  transform-origin: 50% 100%;
  will-change: transform;
}
.reindeer[hidden] { display: none; }
/* Return run: at the bottom of the screen, above the content, clicks pass through */
.reindeer.reindeer-back { position: fixed; top: auto; bottom: 0; z-index: 30; transform-origin: 50% 50%;
  width: 60px; height: 45px; }                          /* half the size of the first run */
.reindeer svg { width: 100%; height: 100%; display: block; overflow: visible; }
.reindeer.run svg { animation: reindeer-bob .3s ease-in-out infinite alternate; }
.reindeer .leg { transform-box: view-box; }
.reindeer .leg-f1 { transform-origin: 78px 57px; }
.reindeer .leg-f2 { transform-origin: 73px 58px; }
.reindeer .leg-b1 { transform-origin: 34px 57px; }
.reindeer .leg-b2 { transform-origin: 40px 58px; }
/* Gallop: front and hind legs swing in opposite directions, slightly offset */
.reindeer.run .leg { animation: reindeer-leg .3s ease-in-out infinite alternate; }
.reindeer.run .leg-f2 { animation-delay: -.06s; }
.reindeer.run .leg-b1 { animation-delay: -.3s; }
.reindeer.run .leg-b2 { animation-delay: -.36s; }
@keyframes reindeer-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-4px); }
}
@keyframes reindeer-leg {
  from { transform: rotate(-32deg); }
  to   { transform: rotate(26deg); }
}

/* Baubles */
.ornaments { position: absolute; inset: 0; pointer-events: none; }
.bauble {
  --w: var(--s);
  --l: var(--len);
  position: absolute; top: 0; left: var(--x);
  width: var(--w);
  display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0;
  animation: swing var(--t, 10s) ease-in-out var(--d, 0s) infinite alternate;
}
.bauble::before {           /* String */
  content: "";
  width: 1px; height: var(--l);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 .5px rgba(55, 110, 160, .12);
}
.bauble::after {            /* Cap */
  content: "";
  order: 1;
  width: calc(var(--w) * .2); height: calc(var(--w) * .1 + 3px);
  margin-bottom: -3px;
  background: linear-gradient(90deg, #c3753e, #f2a46b 45%, #b8652e);
  border-radius: 2px 2px 1px 1px;
}
.bauble-ball {
  order: 2;
  width: var(--w); height: var(--w);
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0 18%, #f3f7fb 45%, #d7e3ee 100%);
  box-shadow: 0 14px 26px -12px rgba(31, 62, 90, .45), inset -6px -10px 18px rgba(55, 110, 160, .12);
}
.bauble-ball { overflow: hidden; }
.bauble-ball > svg {         /* Bauble turns slightly back and forth on its string */
  animation: twist var(--r, 9s) ease-in-out var(--d, 0s) infinite alternate;
}
.b-dots { width: 46%; height: 58%; margin-left: 8%; }
.b-icon { width: 48%; height: 48%; color: var(--sa-orange); }
.b-icon.blue { color: var(--sa-navy); }
@keyframes twist {
  0%   { transform: translateX(-18%) scaleX(.78); }
  50%  { transform: translateX(0) scaleX(1); }
  100% { transform: translateX(18%) scaleX(.78); }
}
@keyframes swing {           /* slow, subtle swinging */
  from { transform: rotate(calc(var(--a, 1.6deg) * -1)); }
  to   { transform: rotate(var(--a, 1.6deg)); }
}

/* Snowflakes as fine lines (like a Christmas card) */
.flake-deco {
  position: absolute;
  color: #fff;
  opacity: .9;
  pointer-events: none;
}
.flake-deco.f1 { width: 90px; height: 90px; left: 4%; bottom: 46px; }
.flake-deco.f2 { width: 64px; height: 64px; right: 13%; bottom: 70px; }

/* ---------- Calendar ---------- */
.page {
  max-width: 880px;
  margin: -86px auto 0;
  padding: 0 16px 40px;
  position: relative;
  z-index: 2;   /* above the reindeer, which runs behind the card */
}
.calendar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(118px, 1fr);
  grid-auto-flow: dense;
  gap: 12px;
  padding: 14px;
  background: var(--sa-bg);
  border-radius: 6px;
  box-shadow: 0 18px 40px -24px rgba(31, 62, 90, .45);
}
.door.big  { grid-column: span 2; grid-row: span 2; }
.door.wide { grid-column: span 2; }

.door {
  --panel-bg: var(--sa-bg);
  --panel-fg: var(--sa-navy);
  --panel-border: #e3ebf2;
  --deco: var(--sa-orange);
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  perspective: 900px;
  border-radius: var(--sa-radius);
  min-width: 0;
}
.door.tone-light  { --panel-bg: #f4f8fc; --panel-border: #dde7f1; --deco: var(--sa-navy-light); }
.door.tone-dark   { --panel-bg: #2c5a80; --panel-fg: #fff; --panel-border: #2c5a80; --deco: rgba(255, 255, 255, .8); }
.door.tone-accent { --panel-bg: var(--sa-orange); --panel-fg: #fff; --panel-border: var(--sa-orange); --deco: rgba(255, 255, 255, .85); }
/* invert the "Heute" label on orange doors, otherwise it disappears */
.door.tone-accent.is-available .door-panel::after { color: var(--sa-orange); background: #fff; }

.door-inside, .door-panel {
  position: absolute; inset: 0;
  border-radius: var(--sa-radius);
}
.door-inside {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--sa-ice);
  border: 1px dashed #c9d9e7;
  color: var(--sa-navy);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.door-inside-icon { width: 24px; height: 24px; color: var(--sa-orange); }

.door-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--panel-bg);
  color: var(--panel-fg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 2px 4px rgba(31, 62, 90, .08);
  transform-origin: left center;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), box-shadow .2s ease;
  backface-visibility: hidden;
  overflow: hidden;
}
.door-num {
  position: relative;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 600;
  line-height: 1;
}
.door.big .door-num { font-size: clamp(60px, 10vw, 96px); }

/* Dot pattern as in the Smart Abstract logo (on a few doors only) */
.door-panel.has-dots::before {
  content: "";
  position: absolute; right: 9px; top: 9px;
  width: 24px; height: 18px;
  background: radial-gradient(circle, var(--deco) 1.2px, transparent 1.6px) 0 0 / 6px 6px;
  -webkit-mask: linear-gradient(225deg, #000 30%, transparent 85%);
          mask: linear-gradient(225deg, #000 30%, transparent 85%);
}

/* small silhouette bottom right (on a few doors only) */
.door-deco {
  position: absolute; right: 10px; bottom: 10px;
  width: 22px; height: 22px;
  color: var(--deco);
}

/* large doors: star + fine snowflakes */
.door-star { position: absolute; left: 22%; top: 24%; width: 34px; height: 34px; color: var(--sa-orange); }
.door-flake { position: absolute; color: #fff; opacity: .28; }
.door-flake.a { width: 120px; height: 120px; left: -30px; bottom: -34px; }
.door-flake.b { width: 64px; height: 64px; right: 14px; top: 14px; }
/* small snowflake icon top left (17, 13, 20, 12, 14) – makes way for the "Heute" label */
.door-deco-tl { position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; color: var(--deco); }
.door.is-available .door-deco-tl { display: none; }
/* larger whole flake bottom left (5, 22) */
.door-flake-bl { position: absolute; left: 10px; bottom: 10px; width: 28%; max-width: 58px; aspect-ratio: 1; height: auto;
  color: var(--sa-navy); opacity: .22; }
.door.tone-dark .door-flake-bl { color: #fff; opacity: .28; }

/* single flake on the left edge (orange doors 11 top, 16 middle, 21 bottom; also 4, 2, 7) */
.door-flake.side { width: 66px; height: 66px; left: -22px; }
.door-flake.side.top    { top: -8px; }
.door-flake.side.mid    { top: calc(50% - 33px); }
.door-flake.side.bottom { bottom: -8px; }
.door.tone-light .door-flake.side, .door.tone-light .door-flake.b { color: var(--sa-navy); opacity: .22; }   /* blue instead of white on light doors */

.door-lock {
  position: absolute; left: 8px; bottom: 8px;
  width: 16px; height: 16px;
  opacity: 0;
  transition: opacity .2s ease;
}

/* States */
.door:disabled { cursor: default; }
.door.is-locked { cursor: not-allowed; }
.door.is-locked:hover .door-lock,
.door.is-locked:focus-visible .door-lock { opacity: .55; }
.door.is-available .door-panel { box-shadow: 0 0 0 2px var(--sa-orange), 0 8px 20px -8px rgba(229, 105, 30, .6); }
.door.is-available .door-panel::after {
  content: "Heute";
  position: absolute; left: 8px; top: 8px;
  padding: 2px 8px;
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #fff;
  background: var(--sa-orange);
  border-radius: 999px;
}
.door.is-available:hover .door-panel,
.door.is-available:focus-visible .door-panel { transform: rotateY(-14deg); }
.door.is-opened .door-panel { transform: rotateY(-104deg); box-shadow: none; }
.door:focus-visible { outline: 2px solid var(--sa-navy-light); outline-offset: 3px; }
.door.shake .door-panel { animation: shake .4s ease; }
@keyframes shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ---------- Sharing & footer ---------- */
.share { text-align: center; margin-top: 34px; color: #4f6377; font-size: 14px; }
.share-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.page-footer {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  padding: 18px 16px 36px;
  font-size: 12.5px; color: #4f6377;
}
.page-footer a { color: var(--sa-navy); text-decoration: none; font-weight: 600; }
.page-footer a:hover { text-decoration: underline; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  font: inherit; font-size: 13.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none;
  color: #fff; background: var(--sa-navy);
  border: 1px solid var(--sa-navy);
  border-radius: var(--sa-radius);
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--sa-navy-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-ghost { color: var(--sa-navy); background: #fff; border-color: var(--sa-border); }
.btn-ghost:hover { background: var(--sa-ice); }

.field { display: block; margin: 0 0 12px; }
.field input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  font: inherit; font-size: 15px;
  border: 1px solid #cfcfcf; border-radius: var(--sa-radius);
}
.field input[type="email"]:focus { outline: 2px solid var(--sa-navy-light); outline-offset: 0; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: #555; }
.check input { margin-top: 2px; flex: none; }
.form-error { color: #b23b3b; font-size: 13px; min-height: 1em; margin: 6px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Modal ---------- */
.modal {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 40px);
  padding: 0;
  border: 0;
  border-radius: var(--sa-radius);
  box-shadow: 0 30px 80px -20px rgba(22, 54, 80, .55);
}
/* the bingo card needs more room so its 25 fields stay readable */
.modal[data-type="bingo"] { width: min(760px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(22, 54, 80, .55); backdrop-filter: blur(2px); }
.modal[open] { animation: pop .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.modal-card { position: relative; padding: 30px 28px 28px; overflow: hidden; }
.modal-flake {
  position: absolute; right: -26px; top: -26px;
  width: 120px; height: 120px;
  color: var(--sa-ice);
  pointer-events: none;
}
.modal-close { z-index: 1; }
.modal-close {
  position: absolute; right: 10px; top: 10px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; background: none; color: #888; cursor: pointer; border-radius: 50%;
}
.modal-close:hover { background: var(--sa-bg-soft-2); color: var(--sa-text); }
.modal-day {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--sa-orange);
}
.modal h2 { margin: 6px 0 14px; font-size: 24px; font-weight: 400; color: var(--sa-navy); padding-right: 30px; }
.modal-body { font-size: 15px; line-height: 1.6; }
.modal-body p { margin: 0 0 12px; }
.modal-body img { max-width: 100%; border-radius: var(--sa-radius); display: block; margin: 0 0 14px; }
.modal-body blockquote {
  margin: 0 0 8px; padding: 6px 0 6px 16px;
  border-left: 3px solid var(--sa-orange);
  font-size: 17px; font-style: italic; color: #444;
}
.muted { color: var(--sa-text-muted); font-size: 13px; }
.big-number { font-size: 54px; font-weight: 400; color: var(--sa-navy); line-height: 1; margin: 4px 0 10px !important; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Feature-Demo */
.demo { margin: 16px 0 4px; }
.demo-start { gap: 8px; }
.demo-media {
  width: 100%; height: auto;
  margin: 0 !important;
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  animation: demo-in .35s ease;
}
.demo-again { display: inline-block; margin-top: 8px; font-size: 13px; }
@keyframes demo-in { from { opacity: 0; transform: translateY(6px); } }

/* Voucher */
.voucher {
  position: relative;
  margin: 6px 0 16px;
  padding: 20px 20px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--sa-night), var(--sa-navy));
  border-radius: var(--sa-radius);
  overflow: hidden;
}
.voucher::after {
  content: ""; position: absolute; right: 22%; top: 0; bottom: 0;
  border-left: 2px dashed rgba(255, 255, 255, .3);
}
.voucher-offer { font-size: 17px; font-weight: 600; line-height: 1.4; max-width: 72%; }
.voucher-code {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 14px;
  padding: 8px 12px;
  font-family: Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .12em;
  color: #fff; background: var(--sa-orange);
  border-radius: var(--sa-radius);
}
.voucher-code button {
  border: 0; background: rgba(255,255,255,.25); color: #fff;
  padding: 3px 8px; border-radius: 3px; cursor: pointer; font: 700 11px/1.4 var(--font);
  letter-spacing: .04em; text-transform: uppercase;
}
.voucher-locked { margin-top: 14px; font-size: 13px; opacity: .85; }
.voucher-note { margin: 12px 0 0; font-weight: 600; color: var(--sa-night); }
.pending {
  padding: 14px 16px; border-radius: var(--sa-radius);
  background: var(--sa-ice); color: var(--sa-night); font-size: 14px;
}

/* Quiz */
.quiz-progress { font-size: 12px; color: var(--sa-text-muted); margin-bottom: 6px; }
.quiz-q { font-weight: 600; margin: 0 0 12px; }
.quiz-answers { display: grid; gap: 8px; }
.quiz-answers button {
  text-align: left; padding: 11px 14px;
  font: inherit; font-size: 14.5px;
  background: #fff; color: var(--sa-text);
  border: 1px solid var(--sa-border); border-radius: var(--sa-radius);
  cursor: pointer;
}
.quiz-answers button:hover, .quiz-answers button:focus-visible { border-color: var(--sa-navy-light); background: var(--sa-ice); }
.quiz-result { text-align: center; padding: 8px 0; }
.quiz-result h3 { font-size: 22px; font-weight: 600; color: var(--sa-navy); margin: 4px 0 8px; }

/* Bingo */
.bingo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
.bingo button {
  min-height: 78px;                         /* wider than tall, so the card fits on a laptop screen */
  padding: 4px 6px;
  font: inherit; font-size: 13.5px; line-height: 1.25;
  background: #fff; color: var(--sa-text);
  border: 1px solid var(--sa-border); border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  hyphens: auto;
}
.bingo button.on { background: var(--sa-navy); color: #fff; border-color: var(--sa-navy); }
.bingo button.free { background: var(--sa-orange); color: #fff; font-weight: 600; }
.bingo-win { text-align: center; font-weight: 600; color: var(--sa-navy); margin-top: 10px; min-height: 1.4em; }

/* Donation */
.donation { margin-top: 14px; padding: 14px 16px; background: var(--sa-ice); border-radius: var(--sa-radius); }
.donation-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--sa-night); }
.donation-amount { font-size: 26px; color: var(--sa-orange); }
.donation-bar { height: 14px; margin: 8px 0 6px; background: #fff; border-radius: 999px; overflow: hidden; }
.donation-fill { height: 100%; width: 0; border-radius: 999px; transition: width .8s ease-out;
  background: repeating-linear-gradient(-45deg, #e9b84a 0 8px, #d9a334 8px 16px); }   /* straw colour */
.donation-fill.bump { animation: donation-bump .6s ease-out; }
@keyframes donation-bump { 50% { filter: brightness(1.25); } }
.donation-meta { font-size: 14px; color: var(--sa-night); }
.donation-bales { font-size: 14px; font-weight: 600; color: var(--sa-navy); margin-top: 2px; }
.donation-bales:empty { display: none; }
.donation .actions { margin-top: 10px; }
.donation-thanks { margin: 10px 0 0; font-weight: 600; color: var(--sa-navy); }
.donation-note { font-size: 13px; margin-top: 10px; }
.donation-reminder { margin: 16px 0 0; padding: 10px 14px; border-left: 4px solid #d9a334;
  background: var(--sa-ice); border-radius: var(--sa-radius); font-size: 15px; }
.donation-reminder a { font-weight: 600; white-space: nowrap; }

/* Word search */
.ws-grid { display: grid; gap: 2px; margin: 10px auto; max-width: 400px; user-select: none; }
.ws-grid button {
  aspect-ratio: 1; padding: 0;
  font: 700 clamp(11px, 3.2vw, 15px)/1 var(--font);
  background: var(--sa-bg-soft-2); color: var(--sa-text);
  border: 0; border-radius: 3px; cursor: pointer;
}
.ws-grid button.sel { background: var(--sa-orange); }
.ws-grid button.found { background: var(--sa-navy); color: #fff; }
.ws-words { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0; padding: 0; list-style: none; }
.ws-label { margin: 12px 0 6px; text-align: center; font-size: 14px; font-weight: 600; color: var(--sa-night); }
.ws-words li { font-size: 13px; font-weight: 600; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; background: var(--sa-ice); color: var(--sa-night); }
.ws-words li.found { text-decoration: line-through; opacity: .5; }
.ws-grid { position: relative; }
.ws-done { margin-top: 14px; padding: 12px 16px; background: var(--sa-orange-light);
  border: 1px solid var(--sa-orange); border-radius: var(--sa-radius); animation: ws-pop .45s ease-out; }
.ws-done h3 { color: var(--sa-orange); }
.ws-done p { margin: 0; }
.ws-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ws-burst span { position: absolute; top: -10%; animation: ws-fall 2.2s ease-in forwards; }
@keyframes ws-fall { to { transform: translateY(460px) rotate(200deg); opacity: 0; } }
@keyframes ws-pop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

/* Generator */
.generator-out {
  min-height: 92px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  margin: 8px 0 16px; padding: 18px;
  font-size: 17px; font-style: italic; color: var(--sa-night);
  background: var(--sa-ice); border-radius: var(--sa-radius);
}

/* Copy template */
.template {
  white-space: pre-wrap;
  font: 13.5px/1.55 Menlo, Consolas, monospace;
  background: var(--sa-bg-soft-2);
  border: 1px solid var(--sa-border); border-radius: var(--sa-radius);
  padding: 14px;
  max-height: 260px; overflow: auto;
}
.lang-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.lang-tab {
  font: 600 13px/1 var(--font); padding: 7px 14px; cursor: pointer;
  color: var(--sa-navy); background: #fff;
  border: 1px solid var(--sa-border); border-radius: 999px;
}
.lang-tab[aria-pressed="true"] { color: #fff; background: var(--sa-navy); border-color: var(--sa-navy); }

/* Game */
.game {
  position: relative;
  height: 300px;
  margin: 8px 0 12px;
  overflow: hidden;
  border-radius: var(--sa-radius);
  background: linear-gradient(180deg, var(--sa-night-deep), var(--sa-navy));
  touch-action: manipulation;
}
.game-hud {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
  display: flex; justify-content: space-between;
  padding: 8px 12px; color: #fff; font-size: 13px; font-weight: 600;
}
.game-item {
  position: absolute; top: -40px;
  width: 38px; height: 46px;
  display: grid; place-items: center;
  border: 0; padding: 0; cursor: pointer;
  border-radius: 3px;
  font-size: 9px; font-weight: 600; letter-spacing: .04em;
  will-change: transform;
}
.game-item.doc { background: #fff; color: var(--sa-navy); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.game-item.doc::before { content: ""; position: absolute; left: 7px; right: 7px; top: 10px; height: 14px;
  background: repeating-linear-gradient(180deg, #c9d7e5 0 2px, transparent 2px 5px); }
.game-item.doc span { margin-top: 22px; }
.game-item.coffee { width: 34px; height: 34px; border-radius: 50%; background: #7a4b2a; color: #fff; font-size: 16px; }
.game-item.pop { transform: scale(1.4) !important; opacity: 0; transition: all .2s ease; }
.game-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #fff; text-align: center; padding: 20px;
  background: rgba(22, 54, 80, .7);
}
.game-overlay strong { font-size: 30px; font-weight: 400; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  color: #fff; background: var(--sa-night);
  border-radius: var(--sa-radius);
  font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .reindeer { width: 76px; height: 57px; }
  .reindeer.reindeer-back { width: 38px; height: 29px; }
  .topbar { padding-top: 10px; padding-bottom: 10px; }
  .hero { padding: 72px 16px 82px; }
  .hero h1 { margin-bottom: 6px; white-space: normal; }
  .hero-sub { font-size: 15px; line-height: 1.45; }
  .hero-status { margin-top: 14px; min-height: 38px; padding: 7px 16px; font-size: 14px; }
  .flake-deco.f1 { display: none; }
  .bauble { --w: var(--sm, var(--s)); --l: var(--lm, var(--len)); left: var(--xm, var(--x)); }
  .bauble.hide-sm, .flake-deco.f2 { display: none; }
  .flake-deco.f1 { width: 60px; height: 60px; left: 4%; bottom: 40px; }
  .page { margin-top: -70px; }
  .calendar { grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(96px, 1fr); gap: 8px; padding: 10px; }
  .door.wide { grid-column: span 1; }
  .door[data-day="24"] { grid-column: span 3; }
  .door[data-day="20"] { grid-column: span 2; }  /* fills the 3-column grid without gaps */
  .modal-card { padding: 26px 18px 20px; }
  /* phones: fields may grow taller than wide, so the text can stay legible */
  .bingo { gap: 3px; }
  .bingo button { min-height: 68px; padding: 3px 2px; font-size: 10.5px; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
