/* ==========================================================
   CHRISTMAS THEME — layered on top of style.css
   To switch off after Christmas: remove the christmas.css and
   christmas.js lines from index.html, faq.html and videos.html.
   ========================================================== */

:root {
    --primary: #c62828;          /* festive red */
    --primary-dark: #7f1d1d;     /* deep cranberry */
    --xmas-green: #166534;
    --xmas-green-dark: #0b3d20;
    --xmas-gold: #e8b923;
    --xmas-cream: #fdf8f0;
    --accent: var(--xmas-gold);
    --bg: #faf6ef;
    --border: #eadfce;
}

* { -webkit-tap-highlight-color: rgba(198, 40, 40, 0.1); }

body {
    background:
        radial-gradient(circle at 10% 20%, rgba(22, 101, 52, 0.05) 0 2px, transparent 3px) 0 0 / 60px 60px,
        radial-gradient(circle at 70% 60%, rgba(198, 40, 40, 0.05) 0 2px, transparent 3px) 0 0 / 80px 80px,
        var(--bg);
}

/* Snow canvas — sits behind content, jumps above the splash while it's showing */
.xmas-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
.xmas-snow.on-splash { z-index: 10000; }

.container { position: relative; z-index: 2; }

/* ---------- Splash ---------- */
.splash-screen {
    background:
        radial-gradient(ellipse at top, rgba(232, 185, 35, 0.18), transparent 60%),
        linear-gradient(160deg, #0b3d20 0%, #14532d 45%, #7f1d1d 100%);
}

.splash-logo { position: relative; }

.xmas-countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding: 0.7rem 1.4rem;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(232, 185, 35, 0.7);
    border-radius: 999px;
    font-size: clamp(1rem, 2.6vw, 1.5rem);
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(4px);
}
.xmas-countdown strong { color: var(--xmas-gold); font-weight: 800; }

.touch-ring { border-color: rgba(232, 185, 35, 0.8) !important; }

/* ---------- Header ---------- */
.header {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 50%, #14532d 100%);
    background-size: 200% 200%;
    padding-bottom: 2.1rem;
}

/* String of fairy lights along the bottom of the header */
.xmas-lights {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 26px;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
    overflow: hidden;
}
.xmas-lights::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 4px;
    height: 10px;
    border-bottom: 2px solid #1f2937;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.xmas-lights span {
    position: relative;
    top: 10px;
    width: 10px;
    height: 15px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: var(--c);
    box-shadow: 0 2px 12px 2px var(--c);
    animation: twinkle 1.6s ease-in-out infinite;
    animation-delay: var(--d);
}
.xmas-lights span::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 2px;
    width: 6px;
    height: 5px;
    background: #374151;
    border-radius: 2px;
}
@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; box-shadow: none; }
}

/* ---------- Cards & UI accents ---------- */
.search-input:focus { box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15); }

.guide-card:hover,
.guide-card:focus-visible {
    box-shadow: 0 12px 28px -8px rgba(198, 40, 40, 0.28), 0 8px 16px -8px rgba(0, 0, 0, 0.1);
}
.guide-card:active { background: linear-gradient(135deg, #fff5f5 0%, #fdecec 100%); }
.guide-card::before {
    background: repeating-linear-gradient(180deg, #c62828 0 12px, #fff 12px 24px);
    width: 6px;
}

.visit-it,
.hours-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #fef2f2 100%);
    border-color: var(--xmas-green);
}
.visit-it:hover,
.visit-it:focus-visible {
    background: linear-gradient(135deg, #dcfce7 0%, #fee2e2 100%);
    box-shadow: 0 6px 16px rgba(22, 101, 52, 0.25);
    border-color: var(--xmas-green);
}
.visit-text strong { color: var(--xmas-green); }

.return-btn { background: linear-gradient(135deg, var(--xmas-green) 0%, var(--xmas-green-dark) 100%); }
.return-btn:hover { box-shadow: 0 8px 20px rgba(22, 101, 52, 0.35); }

.help-section { border-top: 6px solid var(--xmas-green); }


/* ==========================================================
   ADVENT CALENDAR
   (#modalBody prefixes beat style.css's forced modal text colours)
   ========================================================== */

/* ---------- Launcher card on the home grid ---------- */
.guide-card.advent-card {
    background:
        radial-gradient(circle at 85% 110%, rgba(232, 185, 35, 0.35), transparent 55%),
        linear-gradient(140deg, #14532d 0%, #166534 50%, #991b1b 100%);
    border: 3px solid var(--xmas-gold);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 10px 30px -8px rgba(127, 29, 29, 0.55);
}
.guide-card.advent-card .guide-title { color: #fff; font-size: 1.45rem; }
.guide-card.advent-card .guide-description { color: rgba(255, 255, 255, 0.9); }
.guide-card.advent-card::before { background: var(--xmas-gold); }
.guide-card.advent-card:active { background: linear-gradient(140deg, #0b3d20 0%, #7f1d1d 100%); }
.guide-card.advent-card .guide-icon { animation: giftBob 2.4s ease-in-out infinite; transform-origin: bottom center; }

@keyframes giftBob {
    0%, 100% { transform: rotate(0) translateY(0); }
    25% { transform: rotate(-8deg) translateY(-3px); }
    75% { transform: rotate(8deg) translateY(-3px); }
}

/* Light sweep across the card */
.advent-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: cardShine 4.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cardShine {
    0%, 60% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

.advent-card .advent-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--xmas-gold);
    color: #3b2400;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.35);
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.35); }
    50% { box-shadow: 0 0 0 8px rgba(232, 185, 35, 0); }
}

/* ---------- Calendar scene ---------- */
.advent-scene {
    position: relative;
    border-radius: 22px;
    padding: 2.6rem 1rem 1.25rem;
    overflow: hidden;
    border: 4px solid var(--xmas-gold);
    box-shadow: 0 0 0 4px #7f1d1d, 0 18px 40px -12px rgba(0, 0, 0, 0.45);
    background:
        /* snowy hills */
        radial-gradient(ellipse 60% 22% at 20% 100%, #f8fafc 98%, transparent 100%),
        radial-gradient(ellipse 70% 18% at 85% 100%, #e2e8f0 98%, transparent 100%),
        /* moon glow */
        radial-gradient(circle at 88% 10%, #fef9c3 0 20px, rgba(254, 249, 195, 0.22) 21px 34px, rgba(254, 249, 195, 0.08) 35px 60px, transparent 61px),
        linear-gradient(180deg, #0b1437 0%, #102a43 45%, #14532d 100%);
}

/* Lights strung across the top of the scene */
.scene-lights {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
}
.scene-lights::before {
    content: '';
    position: absolute;
    left: -2%;
    right: -2%;
    top: -6px;
    height: 16px;
    border-bottom: 2px solid #0f172a;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.scene-lights span {
    position: relative;
    top: 9px;
    width: 11px;
    height: 16px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: var(--c);
    box-shadow: 0 2px 14px 3px var(--c);
    animation: twinkle 1.4s ease-in-out infinite;
    animation-delay: var(--d);
}

.scene-star {
    position: absolute;
    width: var(--s, 3px);
    height: var(--s, 3px);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.8);
    animation: starTwinkle var(--t, 3s) ease-in-out infinite;
    animation-delay: var(--d, 0s);
    pointer-events: none;
}
@keyframes starTwinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.7); }
    50% { opacity: 1; transform: scale(1.2); }
}

#modalBody .scene-title {
    position: relative;
    text-align: center;
    color: #fde68a !important;
    font-weight: 800;
    font-size: clamp(1.3rem, 3.6vw, 2rem);
    letter-spacing: 0.01em;
    text-shadow: 0 2px 0 #7f1d1d, 0 0 18px rgba(232, 185, 35, 0.55);
    margin-bottom: 0.25rem;
}
#modalBody .scene-sub {
    position: relative;
    text-align: center;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 1rem;
    margin-bottom: 1rem;
}
#modalBody .scene-sub strong { color: #fde68a !important; }

/* Progress bar */
.advent-progress {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 520px;
    margin: 0 auto 1.4rem;
}
.advent-progress .bar {
    flex: 1;
    height: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.35);
    overflow: hidden;
}
.advent-progress .fill {
    display: block;
    height: 100%;
    width: var(--p, 0%);
    border-radius: 999px;
    background: repeating-linear-gradient(-45deg, #dc2626 0 10px, #fff 10px 20px);
    background-size: 28px 28px;
    animation: candyMove 1s linear infinite;
    transition: width 0.6s ease;
}
@keyframes candyMove { to { background-position: 28px 0; } }
#modalBody .advent-progress .count {
    color: #fff !important;
    font-weight: 800;
    white-space: nowrap;
    font-size: 1rem;
}

/* ---------- Doors as wrapped presents ---------- */
.advent-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem 0.9rem;
    padding: 0.9rem 0.25rem 0.5rem;
}
@media (min-width: 640px) { .advent-grid { grid-template-columns: repeat(6, 1fr); } }

.advent-door {
    --ribbon: #fde68a;
    position: relative;
    aspect-ratio: 1;
    border: none;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--wrap, #c62828);
    background-image:
        linear-gradient(90deg, transparent 41%, var(--ribbon) 41% 59%, transparent 59%),
        linear-gradient(0deg, transparent 41%, var(--ribbon) 41% 59%, transparent 59%),
        var(--pattern, none);
    box-shadow:
        inset 0 -8px 0 rgba(0, 0, 0, 0.18),
        inset 0 0 0 2px rgba(255, 255, 255, 0.15),
        0 6px 14px -4px rgba(0, 0, 0, 0.55);
    transition: transform 0.2s ease;
    touch-action: manipulation;
}
.advent-door:active { transform: scale(0.93); }

/* Wrapping-paper patterns */
.advent-door.wrap-dots    { --pattern: radial-gradient(circle, rgba(255,255,255,0.28) 2.5px, transparent 3px) 0 0 / 14px 14px; }
.advent-door.wrap-stripes { --pattern: repeating-linear-gradient(45deg, rgba(255,255,255,0.18) 0 6px, transparent 6px 14px); }
.advent-door.wrap-checks  { --pattern: repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 8px, transparent 8px 16px), repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 8px, transparent 8px 16px); }
.advent-door.wrap-zig     { --pattern: linear-gradient(135deg, rgba(255,255,255,0.18) 25%, transparent 25%) -8px 0 / 16px 16px, linear-gradient(225deg, rgba(255,255,255,0.18) 25%, transparent 25%) -8px 0 / 16px 16px; }

/* Bow: two loops on top */
.advent-door::before,
.advent-door::after {
    content: '';
    position: absolute;
    top: -11%;
    width: 26%;
    height: 22%;
    border: 4px solid var(--ribbon);
    border-radius: 50% 50% 10% 50%;
    background: rgba(0, 0, 0, 0.08);
    pointer-events: none;
}
.advent-door::before { left: 24%; transform: rotate(-20deg); }
.advent-door::after  { right: 24%; transform: scaleX(-1) rotate(-20deg); }

/* Number tag where the ribbons cross */
#modalBody .advent-door .door-num {
    position: relative;
    z-index: 1;
    min-width: 2.3em;
    height: 2.3em;
    padding: 0 0.3em;
    border-radius: 999px;
    background: #fff;
    color: #7f1d1d !important;
    font-weight: 800;
    font-size: clamp(1rem, 3vw, 1.45rem);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 0 0 3px var(--ribbon);
}

/* Locked */
.advent-door.is-locked { filter: saturate(0.6) brightness(0.78); }
#modalBody .advent-door .door-lock {
    position: absolute;
    bottom: 6%;
    right: 6%;
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: inherit !important;
}

/* Today */
.advent-door.is-today {
    animation: todayWiggle 2.2s ease-in-out infinite;
    box-shadow:
        inset 0 -8px 0 rgba(0, 0, 0, 0.18),
        0 0 0 3px #fde68a,
        0 0 26px 8px rgba(253, 230, 138, 0.75);
    z-index: 2;
}
@keyframes todayWiggle {
    0%, 70%, 100% { transform: rotate(0) scale(1.04); }
    75% { transform: rotate(-6deg) scale(1.1); }
    80% { transform: rotate(6deg) scale(1.1); }
    85% { transform: rotate(-4deg) scale(1.08); }
    90% { transform: rotate(3deg) scale(1.06); }
}
#modalBody .advent-door .door-today {
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    white-space: nowrap;
    background: #fde68a;
    color: #7f1d1d !important;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Last day of term — gold present */
.advent-door.big {
    --wrap: #d97706;
    --ribbon: #b91c1c;
    background-color: var(--wrap);
}

/* Opened: unwrapped box showing the prize */
.advent-door.is-opened {
    background: radial-gradient(circle at 50% 40%, #fffbeb 0%, #fef3c7 70%, #fde68a 100%);
    box-shadow: inset 0 0 0 3px #e8b923, inset 0 -8px 0 rgba(180, 83, 9, 0.18), 0 6px 14px -4px rgba(0, 0, 0, 0.5);
    flex-direction: column;
    gap: 0.1rem;
}
.advent-door.is-opened::before,
.advent-door.is-opened::after { display: none; }
#modalBody .advent-door.is-opened .door-icon { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1; }
#modalBody .advent-door.is-opened .door-num {
    min-width: 0;
    height: auto;
    background: none;
    box-shadow: none;
    font-size: 0.85rem;
    color: #92400e !important;
}

/* Locked tap */
.advent-door.shake { animation: doorShake 0.45s ease; }
@keyframes doorShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px) rotate(-3deg); }
    40%, 80% { transform: translateX(6px) rotate(3deg); }
}

/* Unwrapping */
.advent-door.unwrapping {
    animation: unwrap 0.75s cubic-bezier(0.36, 0, 0.66, -0.2) forwards;
    z-index: 5;
}
@keyframes unwrap {
    0%   { transform: scale(1) rotate(0); }
    15%  { transform: scale(1.1) rotate(-10deg); }
    30%  { transform: scale(1.15) rotate(10deg); }
    45%  { transform: scale(1.2) rotate(-8deg); }
    60%  { transform: scale(1.3) rotate(0); filter: brightness(1.4); }
    100% { transform: scale(2.2) rotate(0); opacity: 0; filter: brightness(2); }
}

/* Confetti burst */
.confetti-piece {
    position: fixed;
    z-index: 100000;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    background: var(--c);
    pointer-events: none;
    animation: confettiBurst var(--dur, 1s) cubic-bezier(0.15, 0.6, 0.35, 1) forwards;
}
.confetti-piece.round { border-radius: 50%; width: 10px; height: 10px; }
@keyframes confettiBurst {
    0%   { transform: translate(-50%, -50%) rotate(0) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(0.6); opacity: 0; }
}

#modalBody .advent-toast {
    margin-top: 1rem;
    text-align: center;
    min-height: 1.6em;
    font-weight: 700;
    font-size: 1.05rem;
    color: #b91c1c !important;
}

/* ---------- Revealed tip ---------- */
.advent-reveal {
    position: relative;
    text-align: center;
    padding: 1.5rem 1rem 1rem;
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, #fffbeb 0%, #fef3c7 45%, #fde7e7 100%);
    border: 4px solid var(--xmas-gold);
}
.reveal-rays {
    position: absolute;
    top: -40%;
    left: 50%;
    width: 900px;
    height: 900px;
    margin-left: -450px;
    background: repeating-conic-gradient(from 0deg, rgba(232, 185, 35, 0.22) 0 10deg, transparent 10deg 20deg);
    -webkit-mask-image: radial-gradient(circle, #000 0 25%, transparent 55%);
            mask-image: radial-gradient(circle, #000 0 25%, transparent 55%);
    animation: raysSpin 18s linear infinite;
    pointer-events: none;
}
@keyframes raysSpin { to { transform: rotate(360deg); } }

.advent-reveal > *:not(.reveal-rays):not(.reveal-fall) { position: relative; }

#modalBody .advent-reveal .reveal-day {
    display: inline-block;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff !important;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    box-shadow: 0 4px 0 #7f1d1d;
    margin-bottom: 0.75rem;
    animation: revealPop 0.5s 0.05s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.advent-reveal .reveal-icon {
    font-size: clamp(5rem, 14vw, 7.5rem);
    line-height: 1.15;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.2));
    animation: iconPop 0.8s 0.1s cubic-bezier(0.34, 1.7, 0.64, 1) both, iconFloat 3s 1s ease-in-out infinite;
}
@keyframes iconPop {
    0% { transform: scale(0) rotate(-30deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes revealPop {
    from { opacity: 0; transform: scale(0.7) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
#modalBody .advent-reveal h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.75rem;
    color: #7f1d1d !important;
    animation: revealPop 0.5s 0.25s ease both;
}
#modalBody .advent-reveal .reveal-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #1e293b !important;
    max-width: 560px;
    margin: 0 auto 1rem;
    animation: revealPop 0.5s 0.35s ease both;
}
#modalBody .advent-reveal .reveal-text strong { color: #b91c1c !important; }
#modalBody .advent-reveal .reveal-tip {
    background: #fff;
    border: 3px dashed var(--xmas-green);
    padding: 1rem 1.25rem;
    border-radius: 14px;
    text-align: left;
    max-width: 560px;
    margin: 0 auto 1.5rem;
    font-size: 1.05rem;
    color: #1e293b !important;
    animation: revealPop 0.5s 0.45s ease both;
}
.advent-reveal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: revealPop 0.5s 0.55s ease both;
}
.advent-back {
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #16a34a, #166534);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 0 #0b3d20;
    touch-action: manipulation;
}
.advent-back.alt { background: linear-gradient(135deg, #dc2626, #991b1b); box-shadow: 0 4px 0 #7f1d1d; }
.advent-back:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b3d20; }

/* Gentle confetti rain inside the reveal card */
.reveal-fall {
    position: absolute;
    top: -20px;
    width: 8px;
    height: 12px;
    border-radius: 2px;
    background: var(--c);
    opacity: 0.85;
    pointer-events: none;
    animation: fallDown var(--dur, 3s) var(--d, 0s) linear forwards;
}
@keyframes fallDown {
    0% { transform: translateY(0) rotate(0); opacity: 0.9; }
    100% { transform: translateY(620px) rotate(var(--r, 360deg)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .xmas-lights span,
    .scene-lights span,
    .scene-star,
    .advent-door.is-today,
    .advent-shine,
    .advent-card .advent-badge,
    .guide-card.advent-card .guide-icon,
    .advent-progress .fill,
    .reveal-rays,
    .advent-reveal .reveal-icon { animation: none; }
}

/* ==========================================================
   FESTIVE SPLASH SCREEN
   ========================================================== */
.splash-content { position: relative; z-index: 2; }

/* Hanging baubles */
.splash-baubles {
    position: absolute;
    inset: 0 0 auto 0;
    height: 0;
    pointer-events: none;
    z-index: 1;
}
.splash-baubles::before {          /* garland the baubles hang from */
    content: '';
    position: absolute;
    top: -14px;
    left: -2%;
    right: -2%;
    height: 34px;
    border-bottom: 10px dotted #166534;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    filter: drop-shadow(0 3px 0 #0b3d20);
}
.bauble {
    position: absolute;
    top: 0;
    width: var(--size);
    transform-origin: top center;
    animation: baubleSwing 3.4s ease-in-out infinite;
    animation-delay: var(--d);
}
.bauble::before {                  /* string + cap */
    content: '';
    display: block;
    width: 12px;
    height: calc(var(--len) + 8px);
    margin: 0 auto -4px;
    border-radius: 2px;
    background:
        linear-gradient(90deg, transparent 5px, rgba(255, 255, 255, 0.55) 5px 7px, transparent 7px) top / 100% calc(100% - 8px) no-repeat,
        linear-gradient(#e8b923, #a16207) bottom / 100% 9px no-repeat;
}
.bauble::after {                   /* the ball */
    content: '';
    display: block;
    width: var(--size);
    height: var(--size);
    margin-top: 2px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.85) 0 8%, rgba(255, 255, 255, 0.15) 22%, transparent 40%),
        linear-gradient(180deg, transparent 44%, rgba(255, 255, 255, 0.35) 44% 54%, transparent 54%),
        var(--c);
    box-shadow: inset -6px -8px 14px rgba(0, 0, 0, 0.3), 0 0 22px var(--c);
}
@keyframes baubleSwing {
    0%, 100% { transform: rotate(6deg); }
    50% { transform: rotate(-6deg); }
}

/* Snowy ground and trees */
.splash-ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(ellipse 45% 60% at 15% 100%, #f8fafc 98%, transparent 100%),
        radial-gradient(ellipse 50% 50% at 85% 100%, #e2e8f0 98%, transparent 100%),
        radial-gradient(ellipse 40% 35% at 50% 100%, #f1f5f9 98%, transparent 100%);
}
.splash-ground .tree {
    position: absolute;
    bottom: 40px;
    width: calc(var(--h) * 0.62);
    height: var(--h);
    transform: translateX(-50%);
    background:
        linear-gradient(#f8fafc, #f8fafc) center 18% / 40% 4% no-repeat,
        linear-gradient(#f8fafc, #f8fafc) center 48% / 60% 4% no-repeat,
        #0b3d20;
    clip-path: polygon(50% 0, 70% 28%, 60% 28%, 82% 58%, 70% 58%, 100% 92%, 56% 92%, 56% 100%, 44% 100%, 44% 92%, 0 92%, 30% 58%, 18% 58%, 40% 28%, 30% 28%);
    filter: drop-shadow(0 0 1px #000);
}

/* Santa hat on the logo */
.splash-logo-wrap {
    position: relative;
    display: inline-block;
}
.santa-hat {
    position: absolute;
    width: 62%;
    top: -26%;
    left: -18%;
    transform: rotate(-22deg);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
    animation: hatWobble 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes hatWobble {
    0%, 100% { transform: rotate(-22deg); }
    50% { transform: rotate(-16deg); }
}

.splash-hohoho {
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 800;
    color: #fde68a;
    text-shadow: 0 2px 0 #7f1d1d, 0 0 20px rgba(232, 185, 35, 0.6);
    margin-bottom: 0.25rem;
    animation: hoBounce 2.6s ease-in-out infinite;
}
@keyframes hoBounce {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

.splash-title {
    text-shadow: 0 4px 0 #7f1d1d, 0 0 30px rgba(255, 255, 255, 0.25);
}

/* Big "touch to start" cue */
.touch-indicator .touch-icon { font-size: 4rem; }
.splash-tap {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 1rem 2.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border: 3px solid #fde68a;
    color: #fff;
    font-size: clamp(1.25rem, 3.4vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 0 #7f1d1d, 0 0 0 0 rgba(253, 230, 138, 0.6);
    animation: tapPulse 1.8s ease-in-out infinite;
}
@keyframes tapPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 0 #7f1d1d, 0 0 0 0 rgba(253, 230, 138, 0.6); }
    50% { transform: scale(1.06); box-shadow: 0 6px 0 #7f1d1d, 0 0 0 16px rgba(253, 230, 138, 0); }
}

/* Countdown sits on its own line under the tap button */
.xmas-countdown { display: flex; width: fit-content; margin: 1.25rem auto 0; }

/* Advent calendar advert */
.splash-promo {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 560px;
    margin: 1.25rem auto 0;
    padding: 1rem 1.25rem;
    border-radius: 20px;
    text-align: left;
    background: linear-gradient(135deg, #166534 0%, #14532d 60%, #0b3d20 100%);
    border: 3px solid #fde68a;
    box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.5), 0 0 24px rgba(253, 230, 138, 0.35);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}
.splash-promo[hidden] { display: none; }
.splash-promo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.25) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: cardShine 4s ease-in-out infinite;
    pointer-events: none;
}
.splash-promo:active { transform: scale(0.97); }
.promo-gift {
    font-size: 3.2rem;
    line-height: 1;
    animation: giftBob 2s ease-in-out infinite;
    transform-origin: bottom center;
}
.promo-text { display: flex; flex-direction: column; flex: 1; gap: 0.15rem; }
.promo-text strong { font-size: clamp(1.1rem, 2.8vw, 1.45rem); color: #fde68a; }
.promo-text span { font-size: clamp(0.95rem, 2.2vw, 1.1rem); color: rgba(255, 255, 255, 0.92); }
.promo-arrow {
    font-size: 2.6rem;
    font-weight: 800;
    color: #fde68a;
    animation: arrowNudge 1.2s ease-in-out infinite;
}
@keyframes arrowNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* Shorter / landscape screens: tighten everything up */
@media (max-height: 1100px) {
    .splash-content { padding-top: 5.5rem; }
    .splash-logo { width: 110px; margin-bottom: 0.75rem; padding: 0.6rem; }
    .splash-title { margin-bottom: 0.25rem; }
    .splash-hohoho { margin-bottom: 0; }
    .touch-indicator { display: none; }   /* the big red button is the cue here */
    .splash-tap { margin-top: 1.25rem; }
    .xmas-countdown { margin-top: 1rem; }
    .splash-promo { margin-top: 1rem; }
    .splash-ground { height: 80px; }
    .splash-ground .tree { bottom: 22px; transform: translateX(-50%) scale(0.7); transform-origin: bottom center; }
}

@media (prefers-reduced-motion: reduce) {
    .bauble, .santa-hat, .splash-hohoho, .splash-tap,
    .splash-promo::after, .promo-gift, .promo-arrow { animation: none; }
}

/* ==========================================================
   Calendar card as a slim full-width banner, so the portrait
   kiosk grid still fits its 12 guide cards (3 x 4) on screen.
   ========================================================== */
.guides-grid .guide-card.advent-card {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 1.1rem;
    min-height: auto;
    padding: 0.9rem 1.4rem;
    text-align: left;
}
.guides-grid .advent-card .guide-icon { margin: 0; font-size: 2.8rem; flex-shrink: 0; }
.advent-card-text { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; }
.guides-grid .advent-card .guide-title { margin: 0; }
.guides-grid .advent-card .guide-description { margin: 0; }
.guides-grid .advent-card .advent-badge {
    position: static;
    flex-shrink: 0;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}

/* Cracker joke on the reveal screen */
#modalBody .reveal-joke {
    position: relative;
    max-width: 560px;
    margin: 0.25rem auto 1.25rem;
    padding: 1.1rem 1.25rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 6px 0 #7f1d1d;
    color: #fff !important;
    animation: revealPop 0.5s 0.3s ease both;
}
#modalBody .reveal-joke .joke-label {
    display: inline-block;
    background: #fde68a;
    color: #7f1d1d !important;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}
#modalBody .reveal-joke .joke-q {
    color: #fff !important;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 0.8rem;
}
#modalBody .reveal-joke .joke-a {
    color: #fde68a !important;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 0;
    animation: punchline 0.55s cubic-bezier(0.34, 1.7, 0.64, 1);
}
#modalBody .reveal-joke .joke-a[hidden],
#modalBody .reveal-joke .joke-btn[hidden] { display: none; }
@keyframes punchline {
    from { opacity: 0; transform: scale(0.6) rotate(-4deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}
.joke-btn {
    padding: 0.75rem 1.6rem;
    border: 3px solid #fde68a;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    animation: tapPulse 1.8s ease-in-out infinite;
}
.joke-btn:active { transform: scale(0.96); }
