/* Ala Eh! Christmas Gift Registration
   Mobile-first. Brand palette from the Ala Eh! logo: black, gold, yellow, red. */

@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url("../fonts/poppins-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --black: #0c0c0c;
  --ink: #17150f;
  --gold: #c9a24a;
  --gold-light: #ead39a;
  --gold-soft: #f6ecd2;
  --yellow: #ffd60a;
  --red: #d7141a;
  --red-dark: #a50e12;
  --green: #1d7a46;
  --bg: #f7f4ee;
  --card: #ffffff;
  --text: #1b1a17;
  --muted: #6b665d;
  --line: #e7e1d5;
  --field: #ffffff;
  --field-line: #d6cfc1;
  --danger: #c0261d;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(23, 21, 15, .06);
  --shadow: 0 1px 2px rgba(23, 21, 15, .05), 0 8px 24px rgba(23, 21, 15, .07);
  --font-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, legend, .btn, .brandmark b { font-family: var(--font-head); }
a { color: var(--red-dark); }
img, video, svg { max-width: 100%; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Top app bar ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 12, 12, .96);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 3px solid transparent;
  border-image: repeating-linear-gradient(135deg, var(--red) 0 12px, var(--yellow) 12px 24px) 3;
}
.appbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.brandmark .mark { position: relative; flex: none; }
.brandmark .mark img.logo { width: 42px; height: 42px; display: block; }
.brandmark .mark img.hat { position: absolute; width: 26px; top: -9px; left: -7px; transform: rotate(-22deg); }
.brandmark b { display: block; font-size: 1rem; font-weight: 800; color: var(--yellow); line-height: 1.1; letter-spacing: .01em; }
.brandmark small { display: block; font-size: .72rem; color: var(--gold-light); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-pill {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(234, 211, 154, .45);
  color: var(--gold-light);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.appbar-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .2); }
.appbar-pill.closed .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(215, 20, 26, .25); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 16px 16px 64px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(234, 211, 154, .16), transparent 60%),
    radial-gradient(100% 60% at 50% 115%, rgba(215, 20, 26, .38), transparent 60%),
    linear-gradient(180deg, #0c0c0c 0%, #1a1712 100%);
}
.hero::before { /* faint snow, static: decorative only */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image:
    radial-gradient(1.6px 1.6px at 20px 30px, #fff, transparent),
    radial-gradient(1.2px 1.2px at 110px 90px, #fff, transparent),
    radial-gradient(2px 2px at 190px 40px, var(--gold-light), transparent),
    radial-gradient(1.2px 1.2px at 260px 130px, #fff, transparent);
  background-size: 300px 160px;
}
.hero-inner { position: relative; max-width: 1120px; margin: 0 auto; display: grid; gap: 18px; }

.santa-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #10131f;
  border: 1px solid rgba(234, 211, 154, .55);
  box-shadow: 0 0 0 4px rgba(201, 162, 74, .12), 0 16px 36px rgba(0, 0, 0, .55);
}
.santa-frame video, .santa-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.santa-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -40px 40px -20px rgba(0, 0, 0, .35);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 214, 10, .12);
  border: 1px solid rgba(255, 214, 10, .35);
  color: var(--yellow);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.chip .icon { width: 14px; height: 14px; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 6.4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: #fff;
}
.hero h1 .accent { color: var(--yellow); }
.hero .lead { margin: 0; color: #e9e3d6; font-size: 1rem; max-width: 34rem; }
.hero .cta-row { display: none; }

/* ---------- Layout ---------- */
.wrap { max-width: 720px; margin: -44px auto 0; padding: 0 16px 32px; position: relative; z-index: 2; }
.wrap.wide { max-width: 1200px; margin-top: 24px; }
.wrap.narrow { max-width: 440px; margin-top: 32px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* ---------- Summary card: key facts + slots ---------- */
.summary { padding: 0; overflow: hidden; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 14px 8px 12px; text-align: center; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact .icon { width: 22px; height: 22px; color: var(--red); margin: 0 auto 4px; display: block; }
.fact b { display: block; font-family: var(--font-head); font-size: .92rem; font-weight: 700; line-height: 1.2; }
.fact span { display: block; font-size: .74rem; color: var(--muted); }
.slots { border-top: 1px solid var(--line); padding: 14px 18px 16px; background: #fcfaf5; }
.slots-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.slots-head .label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.slots-head .value { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.slots-head .value b { color: var(--red); font-size: 1.25rem; }
.bar {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #ece6d9;
  appearance: none;
  -webkit-appearance: none;
}
.bar::-webkit-progress-bar { background: #ece6d9; border-radius: 999px; }
.bar::-webkit-progress-value { background: linear-gradient(90deg, var(--yellow), var(--red)); border-radius: 999px; }
.bar::-moz-progress-bar { background: linear-gradient(90deg, var(--yellow), var(--red)); border-radius: 999px; }
.slots .note { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }

/* ---------- Form ---------- */
.form-head { margin: 0 0 18px; }
.form-head h2 { margin: 0 0 2px; font-size: 1.25rem; font-weight: 700; }
.form-head p { margin: 0; color: var(--muted); font-size: .9rem; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 20px; }
legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
legend .step {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--black);
  color: var(--yellow);
  font-size: .82rem;
}
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field label, .field .label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.req { color: var(--red); margin-left: 2px; }
.opt { font-weight: 400; color: var(--muted); }
.hint { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* 16px stops iPhones from zooming in on focus */
  color: var(--text);
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--field);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b665d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
input::placeholder, textarea::placeholder { color: #a39d91; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 74, .22);
}
.field.has-error input, .field.has-error select, .field.has-error textarea, .field.has-error .choice span { border-color: var(--danger); }
.field-error { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; color: var(--danger); font-size: .83rem; font-weight: 500; }
.field-error .icon { width: 16px; height: 16px; margin-top: 2px; }

/* Boy / Girl segmented control */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 10px; box-shadow: var(--shadow-sm); }
.choice label { margin: 0; position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px;
  border: 1px solid var(--field-line);
  background: var(--field);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.choice label:first-child span { border-radius: 10px 0 0 10px; }
.choice label:last-child span { border-radius: 0 10px 10px 0; border-left: 0; }
.choice input:checked + span { background: var(--black); color: var(--yellow); border-color: var(--black); }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(201, 162, 74, .35); position: relative; z-index: 1; }

.privacy {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--gold-soft);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .84rem;
  color: #5d5235;
  margin: 4px 0 18px;
}
.privacy .icon { width: 18px; height: 18px; margin-top: 1px; color: #8a7333; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 6px 16px rgba(215, 20, 26, .25);
  transition: background .15s, transform .08s;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.block { width: 100%; min-height: 54px; font-size: 1.05rem; }
.btn.secondary { background: var(--black); color: var(--yellow); box-shadow: none; }
.btn.secondary:hover { background: #262420; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--field-line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); background: #fff; }
.appbar .btn.ghost, .hero .btn.ghost { color: var(--gold-light); border-color: rgba(234, 211, 154, .45); }
.appbar .btn.ghost:hover { background: rgba(255, 255, 255, .06); }
.btn.small { min-height: 36px; padding: 7px 13px; font-size: .84rem; border-radius: 8px; }
.btn.disabled { opacity: .4; pointer-events: none; }
.btn .icon { width: 18px; height: 18px; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin-bottom: 18px; font-size: .9rem; }
.alert .icon { width: 18px; height: 18px; margin-top: 1px; }
.alert.error { background: #fdeeed; color: #8d1c16; border: 1px solid #f3c9c5; }
.alert.success { background: #e9f5ee; color: #155a31; border: 1px solid #c2e2cf; }

/* ---------- Success ---------- */
.ticket { text-align: center; padding: 28px 20px 24px; }
.ticket .check {
  width: 56px; height: 56px; margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #e3f3e9; color: var(--green);
}
.ticket .check .icon { width: 28px; height: 28px; }
.ticket h2 { margin: 0 0 6px; font-size: 1.35rem; }
.ticket p { margin: 0 0 6px; }
.voucher {
  position: relative;
  margin: 20px auto 16px;
  max-width: 340px;
  border-radius: 14px;
  background: var(--black);
  color: #fff;
  padding: 18px 20px;
  box-shadow: 0 0 0 1px var(--gold) inset, 0 10px 24px rgba(0, 0, 0, .18);
}
.voucher::before, .voucher::after { /* ticket notches */
  content: "";
  position: absolute;
  top: 50%;
  width: 18px; height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--card);
}
.voucher::before { left: -9px; }
.voucher::after { right: -9px; }
.voucher .ref-label { display: block; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); font-weight: 600; }
.voucher .ref { display: block; margin-top: 4px; font-family: var(--font-head); font-size: 2.1rem; font-weight: 800; letter-spacing: .06em; color: var(--yellow); font-variant-numeric: tabular-nums; }
.steps-after { text-align: left; margin: 18px 0 20px; padding: 0; list-style: none; display: grid; gap: 10px; }
.steps-after li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.steps-after .icon { width: 18px; height: 18px; color: var(--gold); margin-top: 2px; }

.closed { text-align: center; padding: 30px 20px; }
.closed .icon { width: 40px; height: 40px; color: var(--red); margin-bottom: 8px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .9rem; }
.nowrap { white-space: nowrap; }
h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 8px; }
.site-footer .inner {
  max-width: 720px; margin: 0 auto; padding: 20px 16px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; font-size: .8rem; color: var(--muted);
}
.site-footer b { color: var(--text); font-family: var(--font-head); }
.site-footer a { color: var(--muted); }

/* ---------- Admin ---------- */
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-title h1 { margin: 0; font-family: var(--font-head); font-size: 1.5rem; }
.admin-title p { margin: 0; color: var(--muted); font-size: .9rem; }
.topbar { display: flex; align-items: center; gap: 10px; }
.topbar .who { color: var(--gold-light); font-size: .82rem; }
.actions { display: inline-flex; gap: 8px; align-items: center; }
form.inline { display: inline; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat.hl { background: var(--black); border-color: var(--black); grid-column: 1 / -1; }
.stat.hl .n { color: var(--yellow); }
.stat.hl .l { color: var(--gold-light); }
.stat .n { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .8rem; font-weight: 500; }
.toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.toolbar input[type=search] { grid-column: 1 / -1; }
.toolbar input, .toolbar select { min-height: 42px; padding: 8px 12px; }
.toolbar .btn { width: 100%; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #faf8f3; color: var(--muted); position: sticky; top: 0; white-space: nowrap; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:hover td { background: #fffbec; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.tag.boy { background: #e6effd; color: #1d4f9a; }
.tag.girl { background: #fde8ef; color: #a3245a; }
.refno { font-weight: 700; white-space: nowrap; font-family: var(--font-head); }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }

/* ---------- Tablet & desktop ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .grid .full { grid-column: 1 / -1; }
  .card { padding: 28px; }
  .summary { padding: 0; }
  .fact { padding: 18px 12px 16px; }
  .fact b { font-size: 1rem; }
  .fact span { font-size: .8rem; }
  .slots { padding: 16px 24px 18px; }
  .stats { grid-template-columns: repeat(5, 1fr); }
  .stat.hl { grid-column: auto; }
  .toolbar { display: flex; flex-wrap: wrap; align-items: center; }
  .toolbar input, .toolbar select { width: auto; flex: 1; min-width: 150px; }
  .toolbar input[type=search] { flex: 3; min-width: 240px; }
  .toolbar .btn { width: auto; }
  .site-footer .inner { flex-direction: row; justify-content: center; gap: 8px; }
}

@media (min-width: 900px) {
  .appbar-inner { padding: 10px 24px; min-height: 68px; }
  .brandmark .mark img.logo { width: 48px; height: 48px; }
  .brandmark b { font-size: 1.1rem; }
  .brandmark small { font-size: .76rem; }
  .hero { padding: 48px 24px 96px; }
  .hero-inner { grid-template-columns: 0.9fr 1.2fr; gap: 48px; align-items: center; }
  .hero-text { order: 1; }
  .hero-media { order: 2; }
  .santa-frame { border-radius: 20px; }
  .santa-frame video, .santa-frame img { object-position: 50% 50%; }
  .chip { font-size: .76rem; }
  .hero .lead { font-size: 1.1rem; }
  .hero .cta-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
  .wrap { margin-top: -56px; }
}

@media print {
  .no-print, .appbar, .hero, .site-footer { display: none !important; }
  body { background: #fff; }
  .wrap.wide { margin: 0; max-width: none; }
  .stat, .table-wrap { box-shadow: none; }
  .table-wrap { border: 0; overflow: visible; }
  th { position: static; }
  .stat.hl { background: #fff; }
  .stat.hl .n, .stat.hl .l { color: #000; }
}

.grid.one { grid-template-columns: 1fr; }

/* ---------- Refinements ---------- */
#register-form { scroll-margin-top: 84px; }
legend { float: left; width: 100%; }
legend + * { clear: both; }
.appbar .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .appbar-inner:has(.topbar) .brandmark small { display: none; }
}

/* Admin list becomes cards on phones */
@media (max-width: 639px) {
  .table-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  table.cards-sm thead { display: none; }
  table.cards-sm, table.cards-sm tbody, table.cards-sm tr, table.cards-sm td { display: block; width: 100%; }
  table.cards-sm tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
  }
  table.cards-sm td {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    padding: 5px 0;
    border: 0;
    background: none !important;
    white-space: normal;
  }
  table.cards-sm td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding-top: 2px;
  }
  table.cards-sm td.refno { font-size: 1rem; color: var(--red-dark); }
  table.cards-sm td.row-actions { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
  table.cards-sm td.row-actions::before, table.cards-sm td[colspan]::before { content: none; }
  table.cards-sm td[colspan] { display: block; text-align: center; }
}

@media (max-width: 639px) { table.cards-sm .tag { justify-self: start; } }

/* ---------- Opening greeting animation: Santa's night ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  color: #fff;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(122, 70, 160, .45), transparent 60%),
    linear-gradient(180deg, #030817 0%, #0a1634 38%, #15275a 70%, #2a2a62 100%);
  /* no-JS fallback: fade away on its own */
  animation: intro-fade-in .6s ease both, intro-out .7s ease 5.6s forwards;
}
html.intro-seen .intro { display: none; }
html.intro-done .intro { animation: intro-out .55s ease forwards; }
html.intro-playing, html.intro-playing body { overflow: hidden; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: scale(1.03); } }
@keyframes intro-fade-in { from { opacity: 0; } }

/* soft aurora ribbon */
.intro-aurora {
  position: absolute;
  inset: -10% -20% auto;
  height: 55%;
  background:
    radial-gradient(40% 50% at 30% 60%, rgba(70, 220, 170, .16), transparent 70%),
    radial-gradient(35% 45% at 70% 40%, rgba(120, 140, 255, .16), transparent 70%);
  filter: blur(10px);
  animation: intro-aurora 9s ease-in-out infinite alternate;
}
@keyframes intro-aurora { to { transform: translateX(6%) skewX(-6deg); opacity: .7; } }

/* twinkling stars */
.intro-stars {
  position: absolute;
  inset: 0 0 25% 0;
  background-image:
    radial-gradient(1.6px 1.6px at 30px 40px, #fff, transparent),
    radial-gradient(1.2px 1.2px at 140px 120px, #fff, transparent),
    radial-gradient(2px 2px at 240px 70px, #fff8d6, transparent),
    radial-gradient(1.2px 1.2px at 330px 180px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 80px 220px, #dfe8ff, transparent);
  background-size: 360px 260px;
  animation: intro-twinkle 2.8s ease-in-out infinite alternate;
}
.intro-stars--far {
  background-size: 220px 170px;
  opacity: .5;
  animation-duration: 3.6s;
  animation-delay: -1.4s;
}
@keyframes intro-twinkle { from { opacity: .35; } to { opacity: 1; } }

.intro-snow {
  position: absolute;
  inset: -240px 0 0;
  opacity: .7;
  background-image:
    radial-gradient(2.2px 2.2px at 20px 30px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 120px 90px, #fff, transparent),
    radial-gradient(2.6px 2.6px at 210px 40px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 290px 160px, #fff, transparent);
  background-size: 320px 240px;
  animation: intro-snowfall 10s linear infinite;
}
@keyframes intro-snowfall { to { transform: translateY(240px); } }

/* village */
.intro-village {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 32vh;
  min-height: 180px;
  max-height: 300px;
  animation: intro-rise 1s ease .2s both;
}
.tw-lights circle { animation: intro-blink 1.2s ease-in-out infinite alternate; }
.tw-lights circle:nth-child(2n) { animation-delay: -.6s; }
.tw-lights circle:nth-child(3n) { animation-delay: -.3s; }
.tw-star { animation: intro-blink 1.6s ease-in-out infinite alternate; }
@keyframes intro-blink { from { opacity: .35; } to { opacity: 1; } }

/* content */
.intro-stage {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(min(32vh, 300px) * .5);
}

.intro-sleigh-wrap { width: min(94vw, 560px); margin-bottom: 4px; }
.intro-sleigh {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45));
  animation:
    intro-sleigh-in 2.1s cubic-bezier(.16, .84, .3, 1) .2s both,
    intro-sleigh-bob 2.4s ease-in-out 2.3s infinite;
}
@keyframes intro-sleigh-in {
  0%   { opacity: 0; transform: translate(110vw, -70px) rotate(-7deg) scale(.8); }
  70%  { transform: translate(-3vw, 6px) rotate(1deg) scale(1); }
  15%  { opacity: 1; }
  100% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
}
@keyframes intro-sleigh-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.intro-logo { position: relative; display: inline-block; margin-bottom: 10px; }
.intro-logo .logo {
  display: block;
  width: 72px; height: 72px;
  filter: drop-shadow(0 0 18px rgba(234, 211, 154, .5)) drop-shadow(0 6px 12px rgba(0, 0, 0, .5));
  animation: intro-pop .8s cubic-bezier(.2, 1.4, .4, 1) 1.7s both;
}
.intro-logo .hat {
  position: absolute;
  width: 44px;
  top: -16px; left: -8px;
  animation: intro-hat .6s cubic-bezier(.3, 1.5, .5, 1) 2.15s both;
}
@keyframes intro-pop {
  0%   { opacity: 0; transform: scale(.4) rotate(-12deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes intro-hat {
  0%   { opacity: 0; transform: translateY(-60px) rotate(-60deg); }
  100% { opacity: 1; transform: translateY(0) rotate(-22deg); }
}

.intro-kicker, .intro-title, .intro-place, .intro-from { margin: 0; animation: intro-rise .7s ease both; }
.intro-kicker {
  font-family: var(--font-head);
  font-size: clamp(.95rem, 4vw, 1.2rem);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-light);
  animation-delay: 2.1s;
}
.intro-title {
  margin: 2px 0 6px;
  font-family: var(--font-head);
  font-size: clamp(2rem, 9vw, 3.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--yellow);
  text-shadow: 0 3px 0 var(--red-dark), 0 0 28px rgba(255, 214, 10, .35);
  animation-name: intro-title;
  animation-duration: .9s;
  animation-timing-function: cubic-bezier(.2, 1.3, .4, 1);
  animation-delay: 2.45s;
}
.intro-place {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 600;
  color: #f3ece0;
  animation-delay: 3s;
}
.intro-place .icon { width: 18px; height: 18px; color: #ff6b5e; }
.intro-from {
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(5, 10, 25, .45);
  border: 1px solid rgba(234, 211, 154, .3);
  font-size: .88rem;
  color: #e3dccd;
  animation-delay: 3.4s;
}
.intro-from b { color: #fff; font-weight: 600; }
@keyframes intro-rise {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes intro-title {
  0%   { opacity: 0; transform: scale(.7); filter: blur(6px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.intro-skip {
  position: absolute;
  z-index: 2;
  right: 16px;
  top: calc(16px + env(safe-area-inset-top));
  min-height: 38px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(234, 211, 154, .45);
  background: rgba(5, 10, 25, .35);
  color: var(--gold-light);
  font: 600 .85rem var(--font-body);
  cursor: pointer;
  animation: intro-fade-in .6s ease 1s both;
}
.intro-skip:hover { background: rgba(255, 255, 255, .12); }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
}
/* keep the greeting clear of the village on wide/short screens */
.intro-sleigh-wrap { width: min(94vw, 560px, 62vh); }
@media (min-width: 700px) {
  .intro-stage { padding-bottom: calc(min(32vh, 300px) - 40px); }
}
.intro-sleigh {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 97%, transparent 100%);
}

/* Full moon: fixed in the sky (not attached to the sleigh) */
.intro-moon {
  position: absolute;
  top: 7vh;
  left: 7vw;
  width: clamp(78px, 22vw, 150px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 38%, rgba(190, 178, 150, .30) 0 4%, transparent 11%),
    radial-gradient(circle at 62% 30%, rgba(190, 178, 150, .24) 0 2%, transparent 8%),
    radial-gradient(circle at 58% 64%, rgba(190, 178, 150, .28) 0 6%, transparent 15%),
    radial-gradient(circle at 28% 70%, rgba(190, 178, 150, .20) 0 2%, transparent 7%),
    radial-gradient(circle at 40% 35%, #fffdf2 0%, #f6edcf 55%, #e6d8ae 100%);
  box-shadow:
    0 0 30px 6px rgba(255, 246, 210, .55),
    0 0 90px 30px rgba(255, 240, 190, .22),
    0 0 180px 70px rgba(160, 170, 255, .10);
  animation: intro-fade-in 1.2s ease .1s both, intro-moonglow 5s ease-in-out 1.3s infinite alternate;
}
@keyframes intro-moonglow {
  to { box-shadow: 0 0 36px 10px rgba(255, 246, 210, .62), 0 0 110px 38px rgba(255, 240, 190, .26), 0 0 200px 80px rgba(160, 170, 255, .12); }
}
@media (min-width: 900px) {
  .intro-moon { top: 9vh; left: 12vw; }
}

/* Christmas village details */
.intro-village .parol {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: parol-sway 3.2s ease-in-out infinite alternate;
}
.intro-village .parol--slow { animation-duration: 4.2s; animation-delay: -1.3s; }
@keyframes parol-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.intro-village .tw-glow { transform-box: fill-box; transform-origin: center; animation: star-pulse 2.4s ease-in-out infinite alternate; }
@keyframes star-pulse { from { opacity: .55; transform: scale(.85); } to { opacity: 1; transform: scale(1.15); } }
.intro-village .smoke circle { animation: smoke-rise 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.intro-village .smoke circle:nth-child(2) { animation-delay: -1.3s; }
.intro-village .smoke circle:nth-child(3) { animation-delay: -2.6s; }
@keyframes smoke-rise { 0% { transform: translate(0, 6px) scale(.8); } 50% { transform: translate(4px, -4px) scale(1.1); } 100% { transform: translate(0, 6px) scale(.8); } }
.intro-village .tw-sparkle circle { animation: intro-blink 1.4s ease-in-out infinite alternate; }
.intro-village .tw-sparkle circle:nth-child(2n) { animation-delay: -.7s; }
.intro-village .tw-sparkle circle:nth-child(3n) { animation-delay: -.35s; }

/* Village height follows the screen width too, so the scene is never cropped
   (the tree's star used to be cut off on wide screens). */
.intro { --village-h: clamp(180px, max(32vh, 20.9vw), 380px); }
.intro-village { height: var(--village-h); min-height: 0; max-height: none; }
.intro-stage { padding-bottom: calc(var(--village-h) * .5); }
.intro-sleigh-wrap { width: min(94vw, 560px, 52vh); }
@media (min-width: 700px) {
  /* keep the greeting above the tree's star (star sits ~19% from the scene top) */
  .intro-stage { padding-bottom: calc(var(--village-h) * .82 + 6px); }
}
@media (min-width: 700px) and (max-height: 780px) {
  .intro-sleigh-wrap { width: min(560px, 42vh); }
  .intro-logo { margin-bottom: 6px; }
  .intro-logo .logo { width: 56px; height: 56px; }
  .intro-logo .hat { width: 36px; top: -13px; left: -7px; }
  .intro-title { font-size: clamp(2rem, 7.5vh, 3.4rem); }
  .intro-from { margin-top: 8px; }
}
@media (max-width: 699px) and (max-height: 720px) {
  .intro-sleigh-wrap { width: min(94vw, 40vh); }
  .intro-logo { margin-bottom: 6px; }
  .intro-logo .logo { width: 56px; height: 56px; }
  .intro-logo .hat { width: 36px; top: -13px; left: -7px; }
  .intro-from { margin-top: 8px; }
}

/* ---------- Admin tabs (Children / Mothers) ---------- */
.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.admin-tabs a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-family: var(--font-head);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.admin-tabs a:hover { color: var(--text); }
.admin-tabs a.active { color: var(--text); border-bottom-color: var(--red); }
.admin-tabs .count {
  padding: 1px 8px;
  border-radius: 999px;
  background: #efeadf;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
}
.admin-tabs a.active .count { background: var(--black); color: var(--yellow); }
@media (min-width: 640px) { .stats.stats-3 { grid-template-columns: repeat(3, 1fr); } }
.admin-title p a { color: var(--muted); word-break: break-all; }
