.tkce-ribbon {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    height: 48px;
    background: radial-gradient(ellipse at 50% 0%, #23332a, #111b16 68%, #101713);
    box-shadow: inset 0 -1px #b58b4f54;
    pointer-events: none;
}

.tkce-ribbon[hidden], .tkce-page-snow[hidden], .tkce-snow-only {
    display: none !important;
}

.tkce-ribbon :where(span, div, svg), .tkce-page-snow :where(svg) {
    pointer-events: none;
    box-sizing: border-box;
}

.tkce-garland {
    position: absolute;
    inset: 0 0 auto;
    width: 100%;
    opacity: .8;
    filter: drop-shadow(0 2px 3px #050907);
}

.tkce-lights {
    position: absolute;
    top: 4px;
    left: 1%;
    right: 1%;
    z-index: 1;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}

.tkce-bulb {
    position: relative;
    display: block;
    margin-top: 10px;
    width: 5px;
    height: 7px;
    transform: rotate(-15deg);
    border-radius: 45% 45% 60% 60%;
    background: radial-gradient(ellipse at 45% 62%, #fffcea 25%, #ffdc7d 62%, #e49332 100%);
    box-shadow: 0 0 5px 2px #ffc55d, 0 0 15px 5px #f3892ca8;
    animation: tkce-sparkle 2.8s var(--phase) ease-in-out infinite;
}

.tkce-bulb::after {
    content: '';
    position: absolute;
    inset: -6px -9px;
    background: radial-gradient(ellipse 52% 12%, #ffedac, #ffd07422 75%, transparent),
                radial-gradient(ellipse 10% 54%, #fff4bd, #ffcb662a 76%, transparent);
    transform: rotate(12deg);
}

.tkce-bulb:nth-child(3n) { margin-top: 3px; transform: rotate(17deg); }
.tkce-bulb:nth-child(4n) { margin-top: 18px; }
.tkce-bulb:nth-child(5n)::after { inset: -9px -12px; }

.tkce-ornaments {
    position: absolute;
    top: 5px;
    left: 2%;
    right: 2%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.tkce-ornaments span {
    --cord: 15px;
    position: relative;
    display: block;
    width: 13px;
    height: 13px;
    margin-top: var(--cord);
    border-radius: 50%;
    transform-origin: 50% calc(-1 * var(--cord));
    background: radial-gradient(circle at 35% 27%, #ffb79b, #af342d 47%, #68211e);
    box-shadow: 0 2px 5px #0007;
    animation: tkce-sway 4.4s ease-in-out infinite alternate;
}

.tkce-ornaments span::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: calc(50% - .5px);
    width: 1px;
    height: var(--cord);
    background: linear-gradient(transparent, #dcb987);
}

.tkce-ornaments span:nth-child(even) {
    --cord: 21px;
    width: 10px;
    height: 14px;
    border-radius: 65% 65% 60% 60%;
    background: radial-gradient(circle at 35% 25%, #fff2c4, #c79953 58%, #805026);
    animation-delay: -2s;
}

.tkce-ornaments span:first-child, .tkce-ornaments span:last-child {
    --cord: 16px;
    width: 18px;
    height: 19px;
    background: none;
    box-shadow: none;
    filter: drop-shadow(0 1px 3px #170e05);
}

.tkce-ornaments span:first-child::after, .tkce-ornaments span:last-child::after {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(from 25deg, #fff4bc, #a86824, #ffe2a0, #b37a31, #fff4bc);
    clip-path: polygon(50% 0, 62% 35%, 100% 39%, 72% 62%, 81% 100%, 50% 79%, 19% 100%, 28% 62%, 0 39%, 38% 35%);
}

.tkce-ornaments span:nth-child(3) { --cord: 24px; animation-delay: -3s; }

.tkce-ribbon-snow, .tkce-page-snow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.tkce-page-snow {
    position: fixed;
    top: var(--tkce-safe-top, 100%);
    z-index: 90;
}

.tkce-flake {
    --travel: 74px;
    position: absolute;
    top: -10px;
    left: var(--x);
    width: var(--size);
    height: var(--size);
    opacity: .8;
    animation: tkce-fall var(--speed) var(--phase) linear infinite;
}

.tkce-ribbon-snow .tkce-flake {
    width: calc(var(--size) * .45);
    height: calc(var(--size) * .45);
    animation-duration: 5.5s;
    opacity: .65;
}

.tkce-page-snow .tkce-flake {
    --travel: calc(100vh - var(--tkce-safe-top, 100vh) + 36px);
    top: -21px;
    left: clamp(0px, var(--x), calc(100% - var(--size)));
    opacity: .82;
    filter: drop-shadow(0 1px 1px #38546870);
}

@keyframes tkce-fall {
    0% { transform: translate(0, 0) rotate(0); }
    45% { transform: translate(var(--drift), calc(var(--travel) * .45)) rotate(34deg); }
    100% { transform: translate(0, var(--travel)) rotate(70deg); }
}

@keyframes tkce-sparkle {
    0%, 100% { opacity: .45; scale: .8; }
    45% { opacity: 1; scale: 1.16; }
}

@keyframes tkce-sway {
    from { transform: rotate(-9deg); }
    to { transform: rotate(9deg); }
}

@media (max-width: 767px) {
    .tkce-no-mobile { display: none !important; }
    .tkce-ribbon { height: 40px; }
    .tkce-garland { height: 32px; }
    .tkce-lights, .tkce-ornaments { top: 3px; }
    .tkce-bulb:nth-child(even), .tkce-flake:nth-child(4n) { display: none; }
    .tkce-ornaments span:first-child, .tkce-ornaments span:last-child { --cord: 13px; }
    .tkce-ornaments span:nth-child(3) { --cord: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .tkce-bulb, .tkce-ornaments span { animation: none; }
    .tkce-ribbon-snow, .tkce-page-snow { display: none !important; }
}
