/* "Candy" theme: pink + blue, matches the marketing page (index_10).
   Switched on per page with body class "theme-candy". Does not touch pages that don't use it. */
body.theme-candy {
    --a: #e0457b;
    --a-d: #4b3a8a;
    --blue: #4c8bf5;
    --denim: #3a4f7a;
    --gold: #e3b873;
    --btn: linear-gradient(135deg, #e0457b, #4c8bf5);
    --btn-sh: rgba(110, 70, 200, 0.35);
    --line: #e6d3ee;
    color: var(--denim);
    background: linear-gradient(180deg, #fff4f8 0%, #fffdf9 38%, #eef5ff 100%);
    background-attachment: fixed;
}

/* header */
.theme-candy .site-header {
    background: rgba(255, 253, 249, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 5;
}

.theme-candy .logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--a-d);
}

.theme-candy .site-header a { color: var(--denim); }
.theme-candy .site-header a.logo { color: var(--a-d); }

.theme-candy .button,
.theme-candy button.button,
.theme-candy .site-header .button {
    background: var(--btn);
    color: #fff;
    box-shadow: 0 8px 20px var(--btn-sh);
    transition: transform 0.2s;
}

.theme-candy .button:hover { transform: translateY(-2px); }

.theme-candy .region-btn { border-color: var(--line); background: #fff; }
.theme-candy .site-footer { color: #7a6f90; }
.theme-candy main { position: relative; z-index: 2; }

.theme-candy h1,
.theme-candy h2,
.theme-candy h3 {
    font-family: "Mountains of Christmas", cursive;
    color: var(--a-d);
}

.theme-candy .alert {
    background: #fff0f4;
    border: 1px solid #f6c3d3;
    color: #8e0f42;
    border-radius: 16px;
}

#candy-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ---------- checkout done ---------- */
.done {
    text-align: center;
    padding-top: 0.5rem;
}

.done-badge {
    width: 92px;
    height: 92px;
    margin: 0 auto 0.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    background: var(--btn);
    box-shadow: 0 14px 34px var(--btn-sh);
    animation: done-pop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes done-pop {
    from { transform: scale(0.3) rotate(-20deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

.done h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    margin: 0.2rem 0 0.4rem;
}

.done h1 span { color: var(--a); }

.done .lede {
    margin: 0 auto 1.4rem;
    font-size: 1.1rem;
}

.done-cta {
    display: inline-block;
    font-size: 1.1rem;
    padding: 0.95rem 2.1rem;
}

.done-small {
    font-size: 0.85rem;
    color: #7a6f90;
    margin: 0.9rem 0 0;
}

.done-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin: 2.4rem 0 0;
    text-align: left;
    counter-reset: ds;
}

.done-step {
    background: #fff;
    border-radius: 22px;
    padding: 1.3rem 1.3rem 1.2rem;
    box-shadow: 0 8px 24px rgba(58, 79, 122, 0.09);
    counter-increment: ds;
}

.done-step::before {
    content: counter(ds);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--btn);
    color: #fff;
    font: 700 1.5rem "Mountains of Christmas", cursive;
    margin-bottom: 0.6rem;
}

.done-step h3 { font-size: 1.45rem; margin: 0 0 0.2rem; }
.done-step p { margin: 0; font-size: 0.92rem; }

.done-vault {
    margin: 2.4rem auto 0;
    max-width: 640px;
    background: #eaf1fd;
    background: linear-gradient(135deg, #fce4ec, #dcebfa);
    border-radius: 22px;
    padding: 1.1rem 1.4rem;
    text-align: left;
    font-size: 0.95rem;
}

.done-vault strong { color: var(--a-d); }

.done-copy {
    margin: 2rem auto 0;
    max-width: 640px;
    text-align: left;
    background: #fffdf5;
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(40, 20, 80, 0.14);
    overflow: hidden;
}

.done-copy::before {
    content: "";
    display: block;
    height: 12px;
    background: repeating-linear-gradient(45deg, var(--a) 0 12px, #fff 12px 24px, var(--blue) 24px 36px, #fff 36px 48px);
}

.done-copy-head {
    padding: 0.8rem 1.4rem 0;
    font: 600 0.78rem Poppins, sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9a7a3a;
}

.done-copy pre {
    margin: 0;
    padding: 0.6rem 1.4rem 1.4rem;
    white-space: pre-wrap;
    word-break: break-word;
    font: 400 0.98rem/1.65 Poppins, sans-serif;
    color: #4a3b2a;
    background: transparent;
}

.done-copy pre a { color: var(--a); font-weight: 600; }

.done-empty {
    max-width: 560px;
    margin: 1.2rem auto 0;
    background: #fff;
    border-radius: 22px;
    padding: 1.6rem;
    box-shadow: 0 8px 24px rgba(58, 79, 122, 0.09);
}

@media (prefers-reduced-motion: reduce) {
    .done-badge { animation: none; }
    #candy-snow { display: none; }
}

/* ---------- forms (parent page + sign in) ---------- */
.theme-candy input[type="checkbox"],
.theme-candy input[type="radio"] { accent-color: var(--a); }

.theme-candy label { color: var(--denim); }

.theme-candy input[type="text"],
.theme-candy input[type="email"],
.theme-candy input[type="password"],
.theme-candy input[type="number"],
.theme-candy select,
.theme-candy textarea {
    width: 100%;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--denim);
    padding: 0.75rem 1rem;
    font: 400 1rem Poppins, sans-serif;
    margin-bottom: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.theme-candy input:focus,
.theme-candy select:focus,
.theme-candy textarea:focus {
    outline: none;
    border-color: var(--a);
    box-shadow: 0 0 0 4px rgba(224, 69, 123, 0.14);
}

.theme-candy input[readonly],
.theme-candy textarea[readonly] {
    background: #f4f1f6;
    color: #7a7384;
    border-color: #e6deea;
}
.theme-candy input[readonly]:focus,
.theme-candy textarea[readonly]:focus {
    border-color: #e6deea;
    box-shadow: none;
}

.theme-candy input[type="file"] {
    width: 100%;
    padding: 0.7rem;
    border: 2px dashed var(--line);
    border-radius: 14px;
    background: #fbf8ff;
    margin-bottom: 0.9rem;
    font: 400 0.9rem Poppins, sans-serif;
    color: var(--denim);
}

.theme-candy input[type="file"]::file-selector-button {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    margin-right: 0.8rem;
    background: var(--btn);
    color: #fff;
    font: 600 0.85rem Poppins, sans-serif;
    cursor: pointer;
}

.theme-candy .panel {
    background: #fff;
    border-radius: 26px;
    padding: 1.5rem 1.6rem;
    box-shadow: 0 10px 30px rgba(58, 79, 122, 0.1);
}

.theme-candy .hint { color: #7a6f90; }
.theme-candy .gift-row { border-top-color: var(--line); }
.theme-candy .thumb { border-radius: 14px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

.theme-candy .notice {
    background: linear-gradient(135deg, #e3f7ea, #dcebfa);
    color: #1f6b45;
    font-weight: 600;
    border-radius: 16px;
}

.theme-candy .saved-next {
    margin: 0 0 1.2rem;
    padding: 1.1rem 1.2rem;
    text-align: center;
}

.theme-candy .saved-next p { margin: 0.4rem 0; }

.theme-candy .saved-next .button {
    font-size: 1.15rem;
    padding: 0.85rem 1.4rem;
}

.photo-queue { list-style: none; padding: 0; margin: 0.6rem 0; }
.photo-queue li { display: flex; gap: 0.6rem; align-items: center; margin: 0.35rem 0; }

.theme-candy .choice {
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 16px;
}

.form-page main { width: min(820px, calc(100% - 2rem)); }

.form-hero { text-align: center; margin-bottom: 1.4rem; }
.form-hero .done-badge { width: 76px; height: 76px; font-size: 2.2rem; }
.form-hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0.3rem 0 0.4rem; }
.form-hero h1 span { color: var(--a); }
.form-hero .lede { margin: 0 auto 1rem; }

.info-card {
    background: linear-gradient(135deg, #fce4ec, #dcebfa);
    border-radius: 22px;
    padding: 1.1rem 1.5rem;
    margin: 0 auto 1.6rem;
    font-size: 0.92rem;
}

.info-card strong { color: var(--a-d); }
.info-card ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.info-card li { margin: 0.25rem 0; }

.form-page form { counter-reset: fs; }

.form-page form .panel h2 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.6rem;
    font-size: 1.9rem;
}

.form-page form .panel h2::before {
    counter-increment: fs;
    content: counter(fs);
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--btn);
    color: #fff;
    font: 700 1.4rem "Mountains of Christmas", cursive;
}

.form-page form .panel h3 { font-size: 1.4rem; margin: 1rem 0 0.2rem; }

/* "add another" buttons: quiet outline, the Save button is the loud one */
.form-page form .panel button.button {
    background: #fff;
    color: var(--a);
    box-shadow: inset 0 0 0 2px var(--a);
    padding: 0.5rem 1.1rem;
}

.form-page form .panel button.button:hover { background: #fff7fa; transform: none; }

.colour-picks { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0 0.2rem; }

.colour-picks .choice {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 1.1rem 0.55rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.colour-picks .choice input { margin: 0; }
.colour-picks .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px rgba(58, 79, 122, 0.25); }

.colour-picks .choice:has(input:checked) {
    border-color: var(--a);
    background: #fff7fa;
    box-shadow: 0 0 0 4px rgba(224, 69, 123, 0.12);
}

.theme-candy .elf-pick {
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(58, 79, 122, 0.08);
}

.theme-candy .elf-pick:has(input:checked) {
    border-color: var(--a);
    box-shadow: 0 0 0 4px rgba(224, 69, 123, 0.14), 0 8px 22px rgba(58, 79, 122, 0.12);
}

.theme-candy .elf-pick strong { color: var(--a-d); }

.savebar {
    position: sticky;
    bottom: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.4rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 0.55rem 0.6rem 0.55rem 1.5rem;
    box-shadow: 0 12px 34px rgba(58, 79, 122, 0.22);
}

.savebar span { font-size: 0.88rem; color: #7a6f90; }
.savebar .button { font-size: 1.05rem; padding: 0.8rem 2.2rem; }

.login-card { max-width: 460px; margin: 0 auto; }
.login-card .button { width: 100%; font-size: 1.05rem; padding: 0.85rem 1rem; }

@media (max-width: 600px) {
    .theme-candy .panel { padding: 1.2rem 1.1rem; }
    .savebar { border-radius: 26px; flex-direction: column; align-items: stretch; padding: 0.8rem 1rem; text-align: center; }
}

/* Santa colour chips: the coloured dot is the radio button, so hide the native circle */
.colour-picks .choice { position: relative; }
.colour-picks .choice input { position: absolute; opacity: 0; pointer-events: none; }
.colour-picks .choice:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(76, 139, 245, 0.35); }

/* elf picker: tidy grid at any width (overrides the old one-column rule) */
.theme-candy .elf-filters button {
    border-color: var(--line);
    color: var(--ink, #3a4f7a);
}
.theme-candy .elf-filters button.on {
    border-color: var(--a);
    background: #fff7fa;
    box-shadow: 0 0 0 4px rgba(224, 69, 123, 0.12);
}
.theme-candy .elf-picks { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.theme-candy .elf-pick video { height: 160px; }

/* ---------- family logins ---------- */
.family-panel h2 { font-size: 1.9rem; margin: 0 0 0.5rem; }
.family-panel h3 { font-size: 1.4rem; margin: 1.3rem 0 0.4rem; }
.safe-list { margin: 0.4rem 0 1rem; padding-left: 1.2rem; font-size: 0.93rem; }
.safe-list li { margin: 0.35rem 0; }
.fam-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; margin: 0.5rem 0; background: #f7f3ff; border-radius: 16px; }
.fam-row form { margin: 0; }
.fam-row .button { padding: 0.45rem 1rem; }
.family-panel code { background: #f4eef8; padding: 0.1rem 0.4rem; border-radius: 6px; word-break: break-all; }
.family-panel button.button { background: #fff; color: var(--a); box-shadow: inset 0 0 0 2px var(--a); }
@media (max-width: 600px) { .fam-row { flex-direction: column; align-items: flex-start; } }

/* ---------- photo uploader ---------- */
.dropzone {
    text-align: center;
    padding: 1.4rem 1rem;
    margin: 0.4rem 0 1rem;
    border: 3px dashed var(--line);
    border-radius: 20px;
    background: #fbf8ff;
    transition: background 0.2s, border-color 0.2s;
}

.dropzone.is-over { background: #fff1f7; border-color: var(--a); }
.dz-icon { font-size: 2.2rem; }
.dz-title { margin: 0.2rem 0 0; font: 700 1.5rem "Mountains of Christmas", cursive; color: var(--a-d); }
.dz-text { margin: 0.2rem auto 0.9rem; max-width: 30rem; font-size: 0.92rem; }
.dropzone .button { font-size: 1.02rem; padding: 0.7rem 1.7rem; }
.dropzone .button:disabled { opacity: 0.45; cursor: not-allowed; }

.new-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.9rem; margin-bottom: 0.4rem; }
.np-card { background: #f7f3ff; border-radius: 16px; padding: 0.6rem; display: grid; gap: 0.45rem; }
.np-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.np-card input[type="text"] { margin-bottom: 0; padding: 0.5rem 0.7rem; font-size: 0.9rem; }
.np-card .button { padding: 0.3rem 0.8rem; font-size: 0.85rem; }

.photo-row figure { margin: 0; width: min(100%, 210px); }
.photo-row .photo-caption { margin: 0.4rem 0 0.2rem; padding: 0.45rem 0.7rem; font-size: 0.88rem; }
.photo-row .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- checkout ---------- */
.checkout-page main { width: min(820px, calc(100% - 2rem)); }

.hero-chips-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 0.4rem; }
.hero-chips-row span { background: #fff; border-radius: 999px; padding: 0.35rem 0.95rem; font: 600 0.85rem Poppins, sans-serif; color: var(--denim); box-shadow: 0 4px 14px rgba(58, 79, 122, 0.12); }

.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.9rem; margin-top: 0.8rem; }

.pkg {
    position: relative;
    display: grid;
    gap: 0.15rem;
    padding: 1.1rem 1.2rem 1rem;
    margin: 0;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 400;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.pkg:hover { transform: translateY(-2px); }
.pkg input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-top strong { font: 700 1.5rem "Mountains of Christmas", cursive; color: var(--a-d); }
.pkg-price { font: 800 1.7rem Poppins, sans-serif; color: var(--a); line-height: 1.1; }
.pkg-note { font-size: 0.82rem; color: #7a6f90; }

.pkg:has(input:checked) {
    border-color: var(--a);
    background: #fff7fa;
    box-shadow: 0 0 0 4px rgba(224, 69, 123, 0.14), 0 12px 28px rgba(58, 79, 122, 0.12);
}

.pkg:has(input:checked)::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 12px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--btn);
    color: #fff;
    font-weight: 700;
}

.pkg:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(76, 139, 245, 0.35); }

.assure {
    display: grid;
    gap: 0.5rem;
    margin: 1.2rem 0 0;
    padding: 1rem 1.3rem;
    background: linear-gradient(135deg, #fce4ec, #dcebfa);
    border-radius: 20px;
    font-size: 0.92rem;
}

.assure b { color: var(--a-d); }
.savebar span b { font: 800 1.25rem Poppins, sans-serif; color: var(--a); }

/* ---------- a copy of the email, shown like a real inbox window ---------- */
.mail-window {
    max-width: 680px;
    margin: 2.2rem auto 0;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 44px rgba(58, 79, 122, 0.2);
    text-align: left;
}

.mail-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1rem;
    background: #f3eef8;
    font: 600 0.82rem Poppins, sans-serif;
    color: #7a6f90;
}

.mail-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d8cfe6; }
.mail-bar span { margin-left: 0.5rem; }
.mail-frame { display: block; width: 100%; height: 900px; border: 0; background: #FFF4F8; }

/* privacy, terms and cookie pages, and the footer links */
.site-footer .legal-links { margin-top: 0.3rem; font-size: 0.9rem; }
.site-footer .legal-links a { color: inherit; }
.legal { max-width: 760px; margin: 0 auto; padding: 1rem 0 3rem; }
.legal h1 { margin-bottom: 0.2rem; }
.legal h2 { margin: 2rem 0 0.4rem; font-size: 1.7rem; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { padding-left: 1.3rem; }
.legal a { color: var(--a); font-weight: 600; }
.legal-updated { color: #7a6f90; margin: 0 0 1rem; font-size: 0.9rem; }
.legal-nav { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0 0.5rem; }
.legal-nav a { padding: 0.35rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.legal-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.95rem; }
.legal-table th, .legal-table td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { color: var(--a-d); }

/* pricing page */
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; max-width: 900px; margin: 1.4rem auto 0; }
.price-card { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 26px; padding: 1.6rem 1.3rem 1.4rem; text-align: center; box-shadow: 0 10px 28px rgba(110, 70, 200, 0.12); display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.price-card.best { border-color: var(--a); box-shadow: 0 14px 34px rgba(224, 69, 123, 0.25); }
.price-card h2 { margin: 0; font-size: 1.8rem; }
.price-flag { position: absolute; top: -0.8rem; background: var(--btn); color: #fff; font: 700 0.75rem Poppins, sans-serif; padding: 0.3rem 0.9rem; border-radius: 999px; }
.price-note { margin: 0; color: #7a6f90; font-size: 0.9rem; min-height: 2.6em; }
.price-amount { font: 700 3rem "Mountains of Christmas", cursive; color: var(--a); margin: 0.2rem 0 0.6rem; line-height: 1; }
.price-plan { text-align: center; margin-top: 2rem; }
.price-includes { max-width: 560px; margin: 1.8rem auto 0; padding: 1.1rem 1.4rem 1.1rem 2.6rem; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--line); border-radius: 20px; line-height: 1.8; }
.price-includes li::marker { content: "✓  "; color: var(--a); font-weight: 700; }
.price-sample { text-align: center; margin-top: 1.2rem; }
.price-sample a { color: var(--a); font-weight: 600; }

/* Santa picker on the parent form: character cards, colour thumbnails, big preview */
.santa-picker { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-top: 0.6rem; }
.sp-preview { text-align: center; position: sticky; top: 1rem; }
.sp-preview img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 22px; border: 5px solid #fff; box-shadow: 0 12px 28px rgba(75, 58, 138, 0.25); background: #f6efe4; }
.sp-preview span { display: block; margin-top: 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--denim); }
.sp-chars { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.6rem; }
.sp-char { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 0.4rem; border: 2px solid var(--line); border-radius: 16px; background: #fff; transition: transform 0.15s; }
.sp-char:hover { transform: translateY(-2px); }
.sp-char img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 11px; }
.sp-char span { display: block; font: 600 0.78rem Poppins, sans-serif; margin-top: 0.3rem; color: var(--denim); }
.sp-char.is-on { border-color: var(--a); box-shadow: 0 6px 18px rgba(224, 69, 123, 0.28); }
.sp-char:focus-visible, .sp-colour:has(input:focus-visible) { outline: 3px solid rgba(76, 139, 245, 0.5); outline-offset: 2px; }
.sp-colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 0.55rem; margin-top: 1rem; }
.sp-colours[hidden] { display: none; }
.sp-colour { position: relative; cursor: pointer; text-align: center; padding: 0.3rem; border: 2px solid transparent; border-radius: 14px; background: rgba(255, 255, 255, 0.7); }
.sp-colour input { position: absolute; opacity: 0; pointer-events: none; }
.sp-colour img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; }
.sp-colour span { display: block; font: 600 0.72rem Poppins, sans-serif; margin-top: 0.2rem; color: var(--denim); }
.sp-colour:has(input:checked) { border-color: var(--a); background: #fff; box-shadow: 0 6px 16px rgba(224, 69, 123, 0.25); }
@media (max-width: 640px) {
    .santa-picker { grid-template-columns: 1fr; }
    .sp-preview { position: static; max-width: 240px; margin: 0 auto; }
}

/* "we are working on it" screen shown while the page is being written after Save */
.working[hidden] { display: none; }
.working {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(255, 228, 240, 0.97), rgba(226, 238, 255, 0.97));
}
.working-card { max-width: 460px; text-align: center; }
.working-card h2 { font-family: "Mountains of Christmas", cursive; font-size: 2.3rem; color: var(--a-d); margin: 0.3rem 0 0.6rem; }
.working-card p { color: #5b4f73; line-height: 1.5; }
.working-santa { width: 190px; margin: 0 auto 0.4rem; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 34px rgba(58, 79, 122, 0.22); background: #fff; }
.working-santa video { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.working-elf:empty { display: none; }
.working-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); overflow: hidden; margin: 1.3rem auto 0.8rem; max-width: 340px; box-shadow: inset 0 1px 3px rgba(58, 79, 122, 0.15); }
.working-bar i { display: block; height: 100%; width: 4%; border-radius: 999px; background: linear-gradient(90deg, var(--a), #8f7bff); animation: working-fill 70s cubic-bezier(.15,.6,.3,1) forwards; }
.working-line { font-weight: 600; min-height: 1.5em; }
body.working-on { overflow: hidden; }
@keyframes working-bounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }
@keyframes working-fill { to { width: 94%; } }
@media (prefers-reduced-motion: reduce) {
    .working-bar i { animation-duration: 0.01s; width: 60%; }
}
.elf-look {
    justify-self: start;
    font-style: normal;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    color: #5a3b86;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(122, 90, 170, 0.35);
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- the Elf Magic Meter ---- */
.magic {
    --glow: 0;
    position: relative;
    overflow: hidden;
    margin: 1rem 0;
    padding: 1.1rem 1.3rem 1.2rem;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #271c5c 0%, #43297f 55%, #6b3f9e 100%);
    box-shadow: 0 10px 34px rgba(60, 30, 120, 0.35), 0 0 calc(10px + var(--glow) * 40px) rgba(255, 216, 107, calc(0.15 + var(--glow) * 0.45));
}
.magic-sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 52%),
        radial-gradient(1px 1px at 28% 70%, #fff 50%, transparent 52%),
        radial-gradient(2px 2px at 46% 18%, #ffe9a6 50%, transparent 52%),
        radial-gradient(1px 1px at 63% 62%, #fff 50%, transparent 52%),
        radial-gradient(1.5px 1.5px at 78% 28%, #fff 50%, transparent 52%),
        radial-gradient(2px 2px at 90% 74%, #ffe9a6 50%, transparent 52%),
        radial-gradient(1px 1px at 6% 80%, #fff 50%, transparent 52%);
    animation: magic-twinkle 3.6s ease-in-out infinite;
}
.magic > * { position: relative; }
.magic-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.magic-title { font-family: "Mountains of Christmas", cursive; font-size: 1.7rem; text-shadow: 0 0 12px rgba(255, 216, 107, 0.8); }
.magic-pct { font-weight: 700; font-size: 1.5rem; color: #ffe9a6; text-shadow: 0 0 calc(6px + var(--glow) * 16px) rgba(255, 216, 107, 0.95); }
.magic-lead { margin: 0.2rem 0 1.1rem; font-size: 0.95rem; color: #efe6ff; }
.magic-track {
    position: relative;
    height: 22px;
    margin: 0 0.9rem 1.5rem 0.2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}
.magic-fill {
    position: relative;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff7bd0, #ffd86b, #8fe3ff, #ffd86b, #ff7bd0);
    background-size: 300% 100%;
    animation: magic-flow 5s linear infinite;
    transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 calc(8px + var(--glow) * 26px) rgba(255, 216, 107, calc(0.4 + var(--glow) * 0.5)), 0 0 calc(2px + var(--glow) * 10px) #fff;
}
.magic-tip {
    position: absolute;
    right: -11px;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #fff3b8 40%, rgba(255, 216, 107, 0) 72%);
    animation: magic-pulse 1.6s ease-in-out infinite;
}
.magic-fill .sp {
    position: absolute;
    right: 4px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px 2px rgba(255, 233, 166, 0.9);
    opacity: 0;
    animation: magic-rise 2.4s ease-out infinite;
}
.magic-fill .sp.s2 { animation-delay: 0.6s; right: 18px; }
.magic-fill .sp.s3 { animation-delay: 1.2s; right: 34px; }
.magic-fill .sp.s4 { animation-delay: 1.8s; right: 52px; }
.magic-star {
    position: absolute;
    top: 50%;
    font-size: 1.3rem;
    transform: translate(-50%, -50%) scale(0.8);
    filter: grayscale(1) brightness(0.8);
    opacity: 0.45;
    transition: filter 0.5s, opacity 0.5s, transform 0.5s;
}
.magic-star.lit {
    filter: drop-shadow(0 0 7px #ffd86b) drop-shadow(0 0 14px rgba(255, 216, 107, 0.8));
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
    animation: magic-pulse 2.2s ease-in-out infinite;
}
.magic-msg { margin: 0; font-size: 1.05rem; font-weight: 600; color: #fff; min-height: 1.5em; }
.magic-next { margin: 0.35rem 0 0; font-size: 0.9rem; color: #d9c9ff; }
.magic-next a { color: #ffe9a6; text-decoration: underline; text-underline-offset: 3px; }
.magic.burst::after {
    content: "✨ 🌟 ✨ ⭐ ✨";
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    font-size: 2.6rem;
    letter-spacing: 0.4em;
    white-space: nowrap;
    pointer-events: none;
    animation: magic-burst 1.8s ease-out forwards;
}
.magic.is-full .magic-title { animation: magic-pulse 2.2s ease-in-out infinite; }

/* beside the Submit button */
.magic-mini { display: inline-flex; align-items: center; gap: 0.5rem; flex: none; font-size: 0.9rem; color: #5b3a8a; }
.magic-mini-bar { position: relative; width: 90px; height: 12px; border-radius: 999px; background: rgba(90, 60, 140, 0.18); overflow: visible; }
.magic-mini-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff7bd0, #ffd86b, #8fe3ff, #ffd86b, #ff7bd0);
    background-size: 300% 100%;
    animation: magic-flow 5s linear infinite;
    transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 calc(4px + var(--glow, 0) * 14px) rgba(255, 190, 60, calc(0.4 + var(--glow, 0) * 0.5));
}
.magic-mini b { min-width: 2.6em; text-align: left; }
.savebar-note { flex: 1; }

/* the elf comment under each section */
.elf-nudge {
    margin: 0.5rem 0 0.8rem;
    padding: 0.55rem 0.9rem;
    border-radius: 14px;
    font-size: 0.92rem;
    color: #5b3a8a;
    background: linear-gradient(90deg, rgba(255, 216, 107, 0.28), rgba(255, 192, 235, 0.22));
    border: 1px dashed rgba(122, 90, 170, 0.45);
}
.elf-nudge.is-good { background: linear-gradient(90deg, rgba(160, 235, 180, 0.35), rgba(255, 233, 166, 0.35)); border-color: rgba(60, 150, 90, 0.5); }

/* the "your page is a little short" box */
.magic-modal { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(30, 16, 70, 0.62); backdrop-filter: blur(3px); }
.magic-card { max-width: 440px; width: 100%; padding: 1.6rem 1.5rem 1.4rem; border-radius: 24px; text-align: center; background: #fff; box-shadow: 0 20px 60px rgba(30, 16, 70, 0.5), 0 0 40px rgba(255, 216, 107, 0.6); }
.magic-card-star { font-size: 3rem; }
.magic-card h3 { margin: 0.2rem 0 0.4rem; font-family: "Mountains of Christmas", cursive; font-size: 1.8rem; color: #43297f; }
.magic-card p { color: #5b4f73; margin: 0 0 0.6rem; }
.magic-card ul { text-align: left; margin: 0 auto 1rem; padding-left: 1.2rem; max-width: 320px; color: #43297f; font-weight: 600; }
.magic-card-buttons { display: flex; flex-direction: column; gap: 0.6rem; }
.magic-anyway { border: 0; background: none; color: #7a6f90; text-decoration: underline; cursor: pointer; font: inherit; padding: 0.4rem; }

@keyframes magic-flow { to { background-position: 300% 0; } }
@keyframes magic-pulse { 0%, 100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.18); } }
@keyframes magic-twinkle { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes magic-rise { 0% { opacity: 0; transform: translateY(0) scale(0.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px) scale(1.1); } }
@keyframes magic-burst { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1.3); } }
@media (max-width: 640px) {
    .magic-mini-bar { width: 56px; }
    .savebar-note { display: none; }
    .magic-title { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    .magic *, .magic::after, .magic-mini-bar i { animation: none !important; transition: none !important; }
}
