.bp-tree-entry,
.bp-tree-dialog {
    --tree-cream: #fcf6e8;
    --tree-ink: #3d2421;
    --tree-muted: #71554b;
    --tree-gold: #ae783e;
    --tree-line: #dfccad;
    --tree-wine: #722639;
    --tree-pine: #254739;
    color: var(--tree-ink);
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bp-tree-entry {
    display: grid;
    grid-template-columns: 59px 1fr 22px;
    align-items: center;
    gap: 11px;
    width: calc(100% - 32px);
    min-height: 72px;
    margin: 12px auto 6px;
    padding: 0 14px 0 4px;
    overflow: hidden;
    border: 1px solid var(--tree-line);
    border-radius: 16px;
    background: linear-gradient(108deg, #e7cba7, #f9ecd6 44%, #f7e8d2);
    text-align: left;
    cursor: pointer;
}

.bp-tree-entry-art {
    align-self: stretch;
    background: url("/christmas-tree/fir.webp") center 12px / 52px auto no-repeat;
    filter: drop-shadow(0 4px 7px #5f3e3340);
}

.bp-tree-entry strong { display: block; font: 700 21px/1.1 Georgia, serif; }
.bp-tree-entry small { display: block; margin-top: 5px; color: var(--tree-muted); font-size: 12px; line-height: 1.35; }
#customize-screen .bp-tree-detail-eligibility {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-left: 2px solid #b38946;
    border-radius: 4px;
    background: #f5ead3;
    color: #544035;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}
.bp-tree-chevron, .bp-tree-back-arrow {
    justify-self: center;
    display: block;
    width: 9px;
    height: 9px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    rotate: 45deg;
}
.bp-tree-back-arrow { rotate: 225deg; margin-inline: auto; }

html.bp-tree-sheet-open, html.bp-tree-sheet-open body {
    background-color: var(--bp-tree-sheet-color) !important;
}
html.bp-tree-sheet-open #app .bnav { visibility: hidden; }
/* The host's usable height constrains the scroller, while the dialog paints to the screen edge. */
.bp-tree-intro-dialog, .bp-tree-dialog {
    --bp-tree-viewport-height: min(100dvh, var(--tg-viewport-stable-height, 100dvh), var(--bp-tree-visible-height, 100dvh));
    --bp-tree-bottom-inset: max(var(--bp-safe-bottom, 0px), env(safe-area-inset-bottom, 0px));
}
.bp-tree-intro-dialog > .bw-badge, .bp-tree-dialog > .bw-badge { display: none; }
.bp-tree-intro-scroll, .bp-tree-scroll {
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.bp-tree-intro-dialog {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: #fff4df;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.bp-tree-intro-dialog::backdrop { background: linear-gradient(#101812ed 48%, #101812 88%); }
.bp-tree-intro-scroll {
    max-height: var(--bp-tree-viewport-height);
    padding: max(var(--bp-tree-intro-top), calc(var(--bp-safe-top, env(safe-area-inset-top)) + 68px)) 16px
        max(18px, calc(var(--bp-tree-bottom-inset) + 12px));
}
.bp-tree-intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 438px);
    margin-inline: auto;
    text-align: center;
}
.bp-tree-intro-dialog button { cursor: pointer; }
.bp-tree-intro-dialog :focus-visible { outline: 2px solid #f7d98f; outline-offset: 4px; }
.bp-tree-intro-close {
    position: fixed;
    z-index: 1;
    inset: calc(var(--bp-safe-top, env(safe-area-inset-top)) + 10px) max(16px, calc((100% - 438px) / 2)) auto auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #fae1af68;
    border-radius: 50%;
    background: #212a21;
    color: #fff4df;
}
.bp-tree-intro-dialog .bp-tree-intro-close:focus-visible {
    outline: none;
    border-color: #fae1af;
    background: #3b493d;
}
.bp-tree-intro-close span { display: grid; place-items: center; width: 18px; height: 18px; }
.bp-tree-intro-close span::before, .bp-tree-intro-close span::after {
    content: '';
    grid-area: 1 / 1;
    width: 16px;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
    transform: rotate(45deg);
}
.bp-tree-intro-close span::after { transform: rotate(-45deg); }
.bp-tree-intro-highlight { width: 100%; }
.bp-tree-intro-highlight .bp-tree-entry {
    width: 100%;
    margin: 0;
    border-color: #f9dda6;
    box-shadow: 0 0 0 3px #f4c77251, 0 6px 44px #e7ad3670;
}
.bp-tree-intro-arrow {
    width: 19px;
    height: 19px;
    margin: 23px 0 16px;
    border-top: 1.5px solid #efc37c;
    border-left: 1.5px solid #efc37c;
    border-radius: 2px 0 0;
    rotate: 45deg;
}
.bp-tree-intro-content h2 { margin: 0; color: #fff4df; font: 700 clamp(28px, 8vw, 36px)/1.12 Georgia, serif; }
.bp-tree-intro-content p { max-width: 31ch; margin: 13px 0 23px; color: #eadcca; font-size: 15px; line-height: 1.5; }
.bp-tree-intro-go, .bp-tree-intro-later { min-height: 46px; font-family: inherit; line-height: 1.3; }
.bp-tree-intro-go {
    width: min(100%, 316px);
    padding: 10px 16px;
    border: 1px solid #f3d198;
    border-radius: 14px;
    background: #f3d198;
    color: #302119;
    font-size: 15px;
    font-weight: 800;
}
.bp-tree-intro-later {
    margin-top: 4px;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: #e5d6c1;
    font-size: 14px;
    font-weight: 650;
}

.bp-tree-dialog {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: min(100%, 496px);
    max-width: none;
    max-height: none;
    min-width: 0;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--tree-line);
    border-radius: 27px;
    background: var(--tree-cream);
    box-shadow: 0 22px 100px #32231553;
}
.bp-tree-scroll {
    max-height: min(calc(var(--bp-tree-viewport-height) * .92), 928px);
    padding-bottom: max(22px, calc(var(--bp-tree-bottom-inset) + 12px));
    scrollbar-width: thin;
}
.bp-tree-dialog::backdrop { background: #241b17a6; backdrop-filter: blur(3px); }
.bp-tree-dialog *, .bp-tree-entry * { box-sizing: border-box; }
.bp-tree-dialog button { font-family: inherit; cursor: pointer; }
.bp-tree-dialog button:disabled { opacity: 0.54; cursor: default; }
.bp-tree-dialog :focus-visible, .bp-tree-entry:focus-visible { outline: 2px solid var(--tree-wine); outline-offset: 3px; }

.bp-tree-top {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 7px;
    align-items: center;
    padding: 10px 15px;
    background: var(--tree-cream);
}
.bp-tree-top h1 {
    margin: 0;
    font: 700 clamp(20px, 5.2vw, 25px)/1.15 Georgia, "Times New Roman", serif;
    text-align: center;
    text-wrap: balance;
}

.bp-tree-icon {
    display: grid;
    place-items: center;
    position: relative;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--tree-line);
    border-radius: 50%;
    background: #fffaf0;
    color: var(--tree-ink);
}
.bp-tree-dialog .bp-tree-close:focus-visible {
    outline: none;
    border-color: var(--tree-ink);
    background: #eadbc4;
}
.bp-tree-close::before, .bp-tree-close::after {
    position: absolute;
    width: 15px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    content: "";
    rotate: 45deg;
}
.bp-tree-close::after { rotate: -45deg; }

.bp-tree-eligibility {
    display: grid;
    gap: 3px;
    margin: 0 12px 9px;
    padding: 9px 13px 10px;
    border: 1px solid #2f5947;
    border-radius: 12px;
    background: #254739;
    color: #fff5da;
    font-size: 12px;
    line-height: 1.32;
}
.bp-tree-eligibility strong { font-size: 13px; font-weight: 850; }
.bp-tree-eligibility span { color: #f8edd7; }

.bp-tree-scene {
    position: relative;
    display: grid;
    place-items: center;
    height: clamp(286px, 49svh, 435px);
    margin: 0 12px;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid #e5c5a2;
    border-radius: 20px 20px 13px 13px;
    background:
        radial-gradient(ellipse at 49% 49%, #fff7dc 4%, #f5dab6 47%, #e1bc98 89%),
        #efd0a9;
}
.bp-tree-eligibility + .bp-tree-scene { height: clamp(247px, 44svh, 411px); }
.bp-tree-scene::before {
    position: absolute;
    z-index: -1;
    right: -40%;
    bottom: 8%;
    left: -40%;
    height: 12%;
    border-top: 1px solid #a16c3d30;
    background: linear-gradient(100deg, #b18960b0, #e0ba95a3 49%, #b88861ac);
    box-shadow: 0 28px 0 24px #ca9c72b5;
    content: "";
    transform: rotate(-2deg);
}
.bp-tree-orbit {
    position: absolute;
    inset: 11% 7% 6%;
    z-index: -1;
    border: 1px solid #fef3d652;
    border-radius: 46% 46% 38% 38%;
    box-shadow: 0 0 13px #fff3d75e;
    transform: rotate(-11deg);
}
.bp-tree-scene.is-complete .bp-tree-orbit {
    border-color: #fff1b9c4;
    box-shadow: 0 0 22px #fff3cb, inset 0 0 19px #fff1bf;
}
.bp-tree-scene.is-crowning .bp-tree-orbit {
    animation: bp-tree-halo 920ms var(--reveal-at) ease-out both;
}
@keyframes bp-tree-halo {
    0% { opacity: .35; transform: rotate(-11deg) scale(.95); }
    48% { opacity: 1; transform: rotate(-11deg) scale(1.035); }
    100% { opacity: 1; transform: rotate(-11deg); }
}
.bp-tree-sparks { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.bp-tree-sparks i {
    position: absolute;
    left: var(--spark-left);
    top: var(--spark-top);
    width: 11px;
    height: 11px;
    background:
        radial-gradient(ellipse 34% 100% at center, #fff5cf 16%, #fff0b9 35%, transparent 70%),
        radial-gradient(ellipse 100% 34% at center, #fff5cf 16%, #fff0b9 35%, transparent 70%);
    filter: drop-shadow(0 0 5px #ffe199);
    animation: bp-tree-shimmer 720ms calc(var(--reveal-at) + var(--spark-delay)) ease-out both;
}
.bp-tree-sparks i:nth-child(2n) { width: 8px; height: 8px; }
.bp-tree-sparks--finale i { animation-duration: 860ms; }
@keyframes bp-tree-shimmer {
    0% { opacity: 0; transform: translate(-50%, 2px) rotate(-15deg) scale(.2); }
    32% { opacity: 1; transform: translate(-50%, -3px) rotate(0deg) scale(1.14); }
    100% { opacity: 0; transform: translate(-50%, -17px) rotate(29deg) scale(.3); }
}
.bp-tree-still {
    position: absolute;
    top: 11px;
    left: 50%;
    height: calc(100% - 22px);
    max-width: 96%;
    aspect-ratio: 2/3;
    transform: translateX(-50%);
    isolation: isolate;
}
.bp-tree-still::before {
    position: absolute;
    inset: auto 8% 0;
    z-index: -1;
    height: 6%;
    border-radius: 50%;
    background: #72504051;
    filter: blur(9px);
    content: "";
}
.bp-tree-fir { display: block; width: 100%; height: 100%; object-fit: contain; }
.bp-tree-toy {
    position: absolute;
    z-index: 2;
    left: var(--x);
    top: var(--y);
    width: var(--width);
    aspect-ratio: 1;
    background: url("/christmas-tree/ornaments.webp") var(--sprite-x) var(--sprite-y) / 600% 300% no-repeat;
    transform: translate(-50%, -50%) rotate(var(--angle));
    filter: drop-shadow(0 4px 3px #21160775);
}
.bp-tree-toy.is-new {
    animation: bp-tree-hang 760ms var(--delay) cubic-bezier(.21, .65, .3, 1) both;
}
.bp-tree-toy.is-new::after {
    position: absolute;
    inset: 15%;
    border: 1px solid #fff0bc;
    border-radius: 50%;
    box-shadow: 0 0 9px #ffd68cb0;
    content: "";
    animation: bp-tree-landing 420ms calc(var(--delay) + 380ms) ease-out both;
}
@keyframes bp-tree-hang {
    0% { opacity: 0; transform: translate(calc(-50% + var(--entry-x)), -125%) scale(.58) rotate(calc(var(--angle) - 24deg)); }
    31% { opacity: 1; transform: translate(-50%, -78%) scale(.9) rotate(calc(var(--angle) - 11deg)); }
    57% { transform: translate(-50%, -46%) scale(1.06) rotate(calc(var(--angle) + 9deg)); }
    78% { transform: translate(-50%, -52%) scale(.99) rotate(calc(var(--angle) - 4deg)); }
    100% { transform: translate(-50%, -50%) rotate(var(--angle)); }
}
@keyframes bp-tree-landing {
    from { opacity: .72; transform: scale(.8); }
    to { opacity: 0; transform: scale(1.73); }
}
.bp-tree-star.is-new { animation-name: bp-tree-star-set; }
@keyframes bp-tree-star-set {
    0% { opacity: 0; transform: translate(-50%, -83%) scale(.34) rotate(-32deg); }
    42% { opacity: 1; transform: translate(-50%, -53%) scale(.91) rotate(-9deg); }
    66% { transform: translate(-50%, -48%) scale(1.13) rotate(6deg); filter: drop-shadow(0 0 12px #ffda83); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}
.bp-tree-wire {
    position: absolute;
    border-bottom: 1px solid #d8af627d;
    border-radius: 0 0 50% 50%;
}
.bp-tree-wire i {
    position: absolute;
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff2bd;
    box-shadow: 0 0 6px 2px #ffcd86d4, 0 0 14px 3px #f1ac5368;
    transform: translate(-50%, -50%);
}
.bp-tree-lights.is-lighting .bp-tree-wire {
    animation: bp-tree-wire-on 380ms calc(var(--reveal-at) + var(--wire-delay)) ease-out both;
}
@keyframes bp-tree-wire-on { from { opacity: 0; } to { opacity: 1; } }
.bp-tree-lights.is-lighting .bp-tree-wire i {
    animation: bp-tree-ignite 460ms calc(var(--reveal-at) + var(--wire-delay) + var(--lamp-delay)) ease-out both;
}
@keyframes bp-tree-ignite {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); }
    45% { opacity: 1; transform: translate(-50%, -50%) scale(1.43); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}
.bp-tree-ribbon {
    position: absolute;
    z-index: 1;
    top: 89%;
    left: 34%;
    width: 32%;
    height: 2.6%;
    border-radius: 16% 16% 33% 33%;
    background: linear-gradient(#fff2c74a, transparent 38%, #10050c55), var(--ribbon-color);
    box-shadow: 0 3px 5px #3b26145f;
}
.bp-tree-ribbon.is-tying {
    animation: bp-tree-tie 590ms var(--reveal-at) cubic-bezier(.21, .65, .3, 1) both;
}
@keyframes bp-tree-tie {
    0% { opacity: 0; transform: translateY(18%) scale(.1, .72); }
    58% { opacity: 1; transform: translateY(0) scale(1.08, 1.15); }
    100% { opacity: 1; transform: scale(1); }
}
.bp-tree-ribbon::before, .bp-tree-ribbon::after {
    position: absolute;
    top: -22%;
    width: 23%;
    height: 172%;
    background: radial-gradient(ellipse at 70% 60%, #14050d60, transparent 66%), var(--ribbon-color);
    box-shadow: 0 3px 4px #3f1a1d4d;
    content: "";
}
.bp-tree-ribbon::before { right: 49%; border-radius: 35% 58% 26% 45%; rotate: 18deg; }
.bp-tree-ribbon::after { left: 49%; border-radius: 55% 35% 43% 23%; rotate: -19deg; }
.bp-tree-skip {
    position: absolute;
    z-index: 4;
    right: 10px;
    bottom: 10px;
    min-height: 44px;
    padding: 8px 13px;
    border: 1px solid var(--tree-line);
    border-radius: 24px;
    color: var(--tree-ink);
    background: #fff8ebf2;
    font-weight: 700;
}

.bp-tree-story { padding: 16px 19px 1px; text-align: center; }
.bp-tree-story h2 { margin: 12px 0 4px; font: 700 clamp(24px, 6.9vw, 33px)/1.1 Georgia, serif; text-wrap: balance; }
.bp-tree-caption { min-height: 40px; max-width: 350px; margin: 7px auto 14px; color: var(--tree-muted); font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.bp-tree-track { display: grid; position: relative; grid-template-columns: repeat(5, 1fr); max-width: 356px; margin: 0 auto; padding: 0; list-style: none; }
.bp-tree-track::before { position: absolute; top: 50%; right: 10%; left: 10%; height: 1px; background: var(--tree-line); content: ""; }
.bp-tree-track li { display: grid; position: relative; place-items: center; }
.bp-tree-track span, .bp-tree-step-number {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 4px;
    border: 1px solid var(--tree-line);
    border-radius: 50%;
    background: var(--tree-cream);
    color: var(--tree-muted);
    font: 700 14px/1 Georgia, serif;
}
.bp-tree-track .earned span { border-color: #8d3d49; background: var(--tree-wine); color: var(--tree-cream); }
.bp-tree-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-tree-actions .bp-tree-button { flex: 1 1 auto; }
.bp-tree-button {
    min-height: 46px;
    padding: 9px 13px;
    border: 1px solid #bf9b74;
    border-radius: 12px;
    background: transparent;
    color: var(--tree-wine);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}
.bp-tree-button.is-primary { border-color: var(--tree-wine); background: var(--tree-wine); color: #fff6e9; }
.bp-tree-button.is-link { min-height: 44px; padding: 6px 9px; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.bp-tree-steps-link { margin-top: 3px; }
.bp-tree-settings { display: flex; flex-wrap: wrap; justify-content: center; border-top: 1px solid var(--tree-line); }

.bp-tree-list {
    display: grid;
    gap: 0;
    margin: 2px 17px 13px;
    padding: 0 11px;
    border: 1px solid var(--tree-line);
    border-radius: 15px;
    background: #fffaf1;
    list-style: none;
}
.bp-tree-rules .bp-tree-list { margin-inline: 0; }
.bp-tree-list li { display: flex; align-items: center; gap: 11px; justify-content: space-between; min-height: 63px; padding: 8px 0; }
.bp-tree-list li + li { border-top: 1px solid var(--tree-line); }
.bp-tree-list small { display: block; margin-top: 4px; color: var(--tree-muted); font-size: 12px; line-height: 1.4; }
.bp-tree-list strong { font-size: 14px; line-height: 1.25; }
.bp-tree-list > li > div { min-width: 0; flex: 1; }
.bp-tree-list .bp-tree-step-number { background: #f1e2cc; color: var(--tree-ink); border: 0; }
.bp-tree-list .bp-tree-button { flex: none; min-height: 44px; margin-left: 3px; }
.bp-tree-empty, .bp-tree-intro, .bp-tree-rules, .bp-tree-confirm, .bp-tree-feedback { margin: 10px 18px 14px; color: var(--tree-muted); font-size: 14px; line-height: 1.48; }
.bp-tree-rules h3, .bp-tree-confirm h3 { margin: 8px 0; color: var(--tree-ink); font: 700 21px/1.2 Georgia, serif; }
.bp-tree-rules p, .bp-tree-confirm p { margin: 8px 0 15px; }
.bp-tree-confirm textarea, .bp-tree-confirm input:not([type="checkbox"]) {
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin: 5px 0 12px;
    padding: 10px;
    border: 1px solid #bf9b74;
    border-radius: 10px;
    background: #fffaf1;
    color: var(--tree-ink);
    font: inherit;
    font-size: 16px;
}
.bp-tree-confirm .bp-tree-check { display: flex; align-items: center; gap: 7px; min-height: 44px; margin-bottom: 7px; }
.bp-tree-confirm .bp-tree-order-total { color: var(--tree-ink); font-size: 19px; font-weight: 800; }
.bp-tree-order-before { margin-inline-end: 8px; color: var(--tree-muted); font-size: 14px; font-weight: 600; }
.bp-tree-confirm .is-primary { width: 100%; }
.bp-tree-feedback { width: auto; padding: 10px; border: 1px solid #bc8e84; border-radius: 10px; background: #f8e9dc; color: #552823; }

@media (max-width: 520px) {
    .bp-tree-dialog {
        --bp-tree-sheet-top: calc(var(--bp-safe-top, env(safe-area-inset-top, 0px)) + 5px);
        inset: var(--bp-tree-sheet-top) 0 0;
        height: auto;
        margin: 0 auto;
        border-bottom: 0;
        border-radius: 22px 22px 0 0;
    }
    .bp-tree-scroll {
        max-height: clamp(0px, calc(var(--bp-tree-viewport-height) - var(--bp-tree-sheet-top) - 1px), 100%);
    }
}
@media (max-width: 360px) {
    .bp-tree-scene { margin-inline: 7px; height: clamp(273px, 45svh, 365px); }
    .bp-tree-eligibility { margin-inline: 7px; }
    .bp-tree-eligibility + .bp-tree-scene { height: clamp(227px, 42svh, 348px); }
    .bp-tree-story { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .bp-tree-toy.is-new,
    .bp-tree-toy.is-new::after,
    .bp-tree-lights.is-lighting .bp-tree-wire,
    .bp-tree-lights.is-lighting .bp-tree-wire i,
    .bp-tree-ribbon.is-tying,
    .bp-tree-scene.is-crowning .bp-tree-orbit,
    .bp-tree-sparks i { animation: none !important; }
    .bp-tree-toy.is-new::after, .bp-tree-sparks { display: none; }
}
