.gift-scene {
    --scene-ink: #f5fbfd;
    --scene-button: #17324d;
    --scene-edge: #f5fbfd59;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 330px;
    margin: 16px 0;
    border-radius: 14px;
    background: #17324d;
    color: var(--scene-ink);
}

.gift-scene-live ~ * { display: none !important; }
.scene-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.scene-art i, .scene-art b, .scene-art span { position: absolute; }
.scene-controls {
    position: absolute;
    z-index: 10;
    inset: auto 15px 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.scene-controls button {
    min-height: 44px;
    padding: 6px 13px;
    border: 1px solid var(--scene-edge);
    border-radius: 9px;
    background: var(--scene-button);
    color: var(--scene-ink);
    font: 650 13px/1.4 Inter, "Segoe UI", system-ui, sans-serif;
    cursor: pointer;
}
.scene-controls button:hover { filter: brightness(1.14); }
.scene-controls button:focus-visible { outline: 3px solid #e9b949; outline-offset: 3px; }
.scene-controls [data-gift-mute]::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 7px 2px 0;
    border: 1px solid currentColor;
    border-radius: 50%;
}
.scene-controls [aria-pressed="true"]::before { border-color: #e9b949; background: #e9b949; }

[data-gift-scene="ribbon"] {
    --scene-button: #0a4f3f;
    background: repeating-linear-gradient(118deg, #fff0 0 3px, #fff1 4px, #112c2540 5px 6px), radial-gradient(ellipse at 48% 35%, #27735b, #0d604d 45%, #103d35 94%);
}
[data-gift-scene="ribbon"]::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid #f1deac50;
    border-radius: 8px;
}
[data-gift-scene="ribbon"] .scene-art {
    inset: 52% auto auto 50%;
    overflow: visible;
    width: min(57%, 260px);
    aspect-ratio: 1.68;
    transform: translate(-50%, -50%) rotate(-8deg);
    perspective: 560px;
}
.scene-art .envelope-back, .scene-art .envelope-pocket { inset: 0; border-radius: 8px; }
.scene-art .envelope-back { background: #cdb180; box-shadow: 6px 15px 23px #102e2a91; }
.scene-art .envelope-pocket {
    z-index: 2;
    clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 100%, 0 100%);
    background: linear-gradient(33deg, #fff0 49%, #b68d52 50%, #fff0 51%) left / 50% no-repeat,
        linear-gradient(-33deg, #fff0 49%, #b68d52 50%, #fff0 51%) right / 50% no-repeat,
        linear-gradient(#fff8e7, #efdfb9);
}
.scene-art .flap {
    z-index: 3;
    inset: 0 0 34%;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(#fffaf0, #dfc798);
    clip-path: polygon(0 0, 100% 0, 51% 98%, 49% 98%);
    transform-origin: top center;
}
.scene-art .letter {
    z-index: 1;
    inset: 8% 6%;
    border: 6px solid #fffef5;
    border-radius: 5px;
    background: #fff9e8;
    box-shadow: inset 0 0 0 1px #d4b674, 0 6px 13px #46321145;
    opacity: 0;
}
.scene-art .ribbon-strip, .scene-art .ribbon-tail {
    z-index: 4;
    background: repeating-linear-gradient(90deg, #fff2 0 1px, #fff0 1px 3px), linear-gradient(#ea6156, #c42b39);
    box-shadow: 0 2px 3px #69343060;
}
.scene-art .ribbon-strip.vertical { inset: 0 43%; }
.scene-art .ribbon-strip.horizontal { inset: 48% 0 36%; }
.scene-art .ribbon-tail {
    top: 52%; left: 49%; width: 41%; height: 15%;
    clip-path: polygon(0 0, 100% 0, 90% 50%, 100% 100%, 0 100%);
    transform: rotate(25deg);
    transform-origin: 0 50%;
}
.scene-art .ribbon-tail.left { transform: rotate(146deg); }
.scene-art .seal {
    z-index: 5;
    top: 56%; left: 50%;
    width: 13%; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 1px solid #ffe6a5;
    border-radius: 50%;
    background: radial-gradient(circle at 31% 27%, #ffe6a5, #e9b949 70%, #bd7734);
    box-shadow: inset 0 0 0 3px #9864273d, 0 2px 5px #562c279c;
}
.scene-playing[data-gift-scene="ribbon"] .scene-art { animation: straight-envelope 1.25s ease-out both; }
.scene-playing .ribbon-strip.vertical { animation: ribbon-up .95s .32s ease-in both; }
.scene-playing .ribbon-strip.horizontal { animation: ribbon-across .95s .32s ease-in both; }
.scene-playing .ribbon-tail { animation: ribbon-away 1.1s .24s ease-in both; }
.scene-playing .ribbon-tail.left { animation-name: ribbon-left; }
.scene-playing .seal { animation: seal-away .65s .66s ease-in both; }
.scene-playing .flap { animation: open-flap .85s 1.28s ease-in-out both; }
.scene-playing .letter { animation: pull-letter 1.19s 2.13s ease-out both; }
@keyframes straight-envelope { to { transform: translate(-50%, -45%) rotate(0); } }
@keyframes ribbon-up { to { transform: translateY(-105%) skewX(-15deg); opacity: 0; } }
@keyframes ribbon-across { to { transform: translateX(90%) skewY(-12deg); opacity: 0; } }
@keyframes ribbon-away { to { transform: translate(130%, -35%) rotate(-21deg) scaleX(1.6); opacity: 0; } }
@keyframes ribbon-left { to { transform: translate(-150%, 95%) rotate(185deg) scaleX(1.6); opacity: 0; } }
@keyframes seal-away { to { transform: translate(-50%, -120%) scale(.45) rotate(43deg); opacity: 0; } }
@keyframes open-flap {
    49% { z-index: 3; }
    50% { z-index: 0; }
    to { transform: rotateX(174deg); z-index: 0; }
}
@keyframes pull-letter {
    0% { opacity: 0; }
    18% { opacity: 1; }
    to { transform: translateY(-68%) scale(1.08); opacity: 1; }
}

[data-gift-scene="porch"] {
    background: repeating-linear-gradient(0deg, #0b1d30aa 0 1px, #f5fbfd13 1px 2px, #fff0 2px 27px),
        linear-gradient(110deg, #35617c, #142c42 71%);
}
.scene-art .porch-glow {
    inset: 0;
    background: radial-gradient(ellipse at 50% 42%, #fff1b7c9, #e9b94962 24%, #d681321a 56%, #fff0 74%);
    opacity: 0;
    transform: scale(.52);
}
.scene-art .lantern {
    left: 50%; top: 24%;
    width: 82px; height: 85px;
    transform: translateX(-50%);
    filter: drop-shadow(4px 6px 7px #0a1e31bb);
}
.scene-art .lantern::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 1px 0 auto;
    height: 27px;
    background: linear-gradient(145deg, #dbc399, #615d59 48%, #1b3446 54%);
    clip-path: polygon(36% 0, 64% 0, 100% 90%, 97% 100%, 3% 100%, 0 90%);
}
.scene-art .lantern::after {
    content: "";
    position: absolute;
    top: -9px; left: 40%;
    width: 20%; aspect-ratio: 1;
    border: 3px solid #b5976a;
    border-radius: 50%;
}
.scene-art .lantern b {
    inset: 25px 7% 0;
    background: linear-gradient(112deg, #315472, #192f42 57%, #335571);
    clip-path: polygon(0 0, 100% 0, 84% 100%, 16% 100%);
    box-shadow: inset 0 0 0 4px #192b39;
}
.scene-art .lantern b::before, .scene-art .lantern b::after { content: ""; position: absolute; }
.scene-art .lantern b::before { inset: 3px; background: radial-gradient(ellipse at 48% 70%, #fff6bd, #e9b949 43%, #a36a3c); opacity: 0; }
.scene-art .lantern b::after { inset: 0 47% 0 49%; background: #413c3b; border-left: 2px solid #a9895b; }
.scene-art .porch-mail {
    top: 58%; left: 50%;
    width: 116px; height: 69px;
    transform: translate(-50%, -14%) rotate(-9deg);
    border: 1px solid #c0cbd3;
    border-radius: 5px;
    background: linear-gradient(#e0eaf0, #a8bdc9);
    box-shadow: 5px 10px 17px #0a223186;
}
.scene-art .porch-mail::before, .scene-art .porch-mail::after { content: ""; position: absolute; }
.scene-art .porch-mail::before { inset: 0; clip-path: polygon(0 0, 100% 0, 53% 62%, 47% 62%); background: linear-gradient(#f5fbfd, #b2c6d3); }
.scene-art .porch-mail::after { top: 47%; left: 44%; width: 13%; aspect-ratio: 1; border-radius: 50%; background: #a92c39; box-shadow: inset 0 0 0 2px #782a3a; }
.scene-playing .lantern b::before { animation: light-glass 1.8s .55s ease-out both; }
.scene-playing .porch-glow { animation: porch-light 2.6s .78s ease-out both; }
.scene-playing .porch-mail { animation: warm-mail 1.1s 2.12s ease-out both; }
@keyframes light-glass { 32% { opacity: .4; } 51% { opacity: .29; } to { opacity: 1; } }
@keyframes porch-light { to { opacity: 1; transform: none; } }
@keyframes warm-mail { to { filter: sepia(.52) brightness(1.16); } }

[data-gift-scene="snow"] {
    --scene-button: #254c63;
    background: linear-gradient(#17324d, #42738e 77%, #6d9cad);
}
.scene-art .winter-moon {
    width: 46px; aspect-ratio: 1;
    border-radius: 50%;
    top: 19%; left: 14%;
    background: radial-gradient(circle at 35% 29%, #fffbe6, #eedcb1);
    box-shadow: 0 0 0 9px #fff0c412, 0 0 24px #e2eff250;
}
.scene-art .snow-hills {
    inset: auto -12% -21% -13%;
    height: 58%;
    border-radius: 50% 52% 0 0;
    transform: rotate(-7deg);
    background: linear-gradient(166deg, #c4d9df, #749cb4);
}
.scene-art .snow-hills.near {
    inset: auto -15% -28% -19%;
    transform: rotate(12deg);
    background: linear-gradient(166deg, #f5fbfd, #adc8d6 46%, #6689a0);
}
.scene-art .winter-cabin {
    top: 55%; left: 61%; width: 61px; height: 46px;
    filter: drop-shadow(3px 4px 4px #142c45ad);
}
.scene-art .winter-cabin b {
    inset: 46% 4% 0;
    border-radius: 2px;
    background: repeating-linear-gradient(0deg, #6c2634 0 1px, #fff0 1px 6px), #ad3b45;
}
.scene-art .winter-cabin b::after {
    content: ""; position: absolute; inset: 25% 20% 24%;
    background: linear-gradient(90deg, #fff0 45%, #7b4535 46% 54%, #fff0 55%), #f9d28b;
    box-shadow: 0 0 6px #fbe09d88;
}
.scene-art .winter-cabin::after {
    content: ""; position: absolute; inset: 0 0 auto; height: 56%;
    clip-path: polygon(50% 0, 100% 98%, 0 98%);
    background: linear-gradient(#d9ecf6 0 65%, #354f67 66% 100%);
}
.scene-art .winter-pine {
    top: 63%; left: 14%; width: 44px; height: 68px;
    clip-path: polygon(50% 0, 69% 31%, 59% 31%, 82% 62%, 67% 62%, 94% 92%, 56% 92%, 56% 100%, 44% 100%, 44% 92%, 6% 92%, 33% 62%, 18% 62%, 41% 31%, 31% 31%);
    background: linear-gradient(159deg, #dbe9f1 0 24%, #227b67 25%, #0d604d 60%, #0a4539);
    filter: drop-shadow(3px 5px 4px #142c4580);
}
.scene-art .winter-pine.small { left: 24%; top: 61%; scale: .67; }
.scene-art .winter-pine.right { left: auto; right: 12%; top: 67%; scale: 1.11; }
.scene-art .falling-snow { position: absolute; inset: 0; }
.scene-art .falling-snow i { top: var(--top); left: var(--left); width: var(--size, 5px); aspect-ratio: 1; border-radius: 50%; background: #f5fbfd; opacity: .78; }
.scene-art .falling-snow i:nth-child(1) { --top: 30%; --left: 19%; --delay: -.43s; }
.scene-art .falling-snow i:nth-child(2) { --top: 48%; --left: 30%; --delay: -.72s; --size: 3px; }
.scene-art .falling-snow i:nth-child(3) { --top: 22%; --left: 41%; --delay: -.22s; --size: 7px; }
.scene-art .falling-snow i:nth-child(4) { --top: 54%; --left: 50%; --delay: -.51s; }
.scene-art .falling-snow i:nth-child(5) { --top: 36%; --left: 57%; --delay: -.61s; --size: 3px; }
.scene-art .falling-snow i:nth-child(6) { --top: 56%; --left: 72%; --delay: -.24s; }
.scene-art .falling-snow i:nth-child(7) { --top: 28%; --left: 81%; --delay: -.73s; --size: 4px; }
.scene-playing .falling-snow i { animation: snow-settles 3.8s var(--delay) linear both; }
.scene-playing .snow-hills { animation: drift-layer 2.6s .07s ease-out both; }
.scene-playing .snow-hills.near { animation: drift-front 2.55s .42s ease-out both; }
@keyframes snow-settles {
    from { translate: -18px -105px; opacity: 0; }
    35% { translate: 2px -10px; opacity: .94; }
    69% { translate: -5px 48px; opacity: .75; }
    to { translate: 19px 94px; opacity: 0; }
}
@keyframes drift-layer { from { translate: 0 43px; } to { translate: none; } }
@keyframes drift-front { from { translate: 0 62px; } to { translate: none; } }

[data-gift-scene="tag"] {
    --scene-button: #632731;
    --scene-edge: #e7c39e74;
    background: radial-gradient(circle, #f1deac33 0 1px, #fff0 2px) 0 0 / 26px 26px,
        radial-gradient(circle, #f1deac22 0 1px, #fff0 2px) 13px 13px / 26px 26px,
        repeating-linear-gradient(118deg, #fff0 0 3px, #fff1 4px, #3d132726 5px 6px),
        radial-gradient(ellipse at 47% 35%, #a7323d, #862d39 52%, #5a2230);
}
.scene-art .tag {
    top: 34%; left: 50%;
    width: 104px; height: 153px;
    transform: translateX(-50%) rotate(-10deg);
    transform-origin: 50% -93px;
    perspective: 450px;
    filter: drop-shadow(8px 10px 9px #64452550);
}
.scene-art .tag::before {
    content: "";
    position: absolute;
    top: -95px; bottom: 90%;
    left: 47%; width: 6px;
    transform: rotate(1deg);
    border-radius: 4px;
    background: repeating-linear-gradient(42deg, #bea275 0 2px, #f0dfb5 2px 4px);
}
.scene-art .tag b, .scene-art .tag span {
    position: absolute;
    inset: 0;
    clip-path: polygon(0 20%, 22% 0, 78% 0, 100% 20%, 100% 100%, 0 100%);
    border: 1px solid #be9c60;
    border-radius: 7px;
    background: radial-gradient(circle at 50% 13%, #8b6247 0 3px, #e9b949 3px 6px, #fff0 7px), linear-gradient(#fff9e9, #efddb1);
    backface-visibility: hidden;
}
.scene-art .tag b::after, .scene-art .tag span::after { content: ""; position: absolute; inset: 29% 12% 9%; border: 1px solid #bc9c59; border-radius: 4px; }
.scene-art .tag b {
    background: radial-gradient(circle at 50% 13%, #79343c 0 3px, #e9b949 3px 6px, #fff0 7px),
        repeating-linear-gradient(121deg, #fff0 0 3px, #fff1 4px),
        linear-gradient(165deg, #187761, #0d604d 53%, #0a4f3f);
}
.scene-art .tag span { transform: rotateY(-180deg); }
.scene-art .tag span::before {
    content: "";
    position: absolute;
    top: 39%; left: 26%; right: 26%; bottom: 23%;
    background: #0d604d;
    clip-path: polygon(50% 0, 67% 27%, 59% 27%, 78% 53%, 68% 53%, 91% 82%, 56% 82%, 56% 100%, 44% 100%, 44% 82%, 9% 82%, 32% 53%, 22% 53%, 41% 27%, 33% 27%);
}
.scene-playing .tag { animation: swing-tag 2.9s ease-out both; }
.scene-playing .tag b { animation: tag-front .83s 2.45s ease-in-out both; }
.scene-playing .tag span { animation: tag-back .83s 2.45s ease-in-out both; }
@keyframes swing-tag {
    0% { transform: translate(-50%, 0) rotate(-10deg); }
    25% { transform: translate(-50%, 0) rotate(13deg); }
    50% { transform: translate(-50%, 0) rotate(-10deg); }
    73% { transform: translate(-50%, 0) rotate(6deg); }
    to { transform: translate(-50%, 0) rotate(-2deg); }
}
@keyframes tag-front { to { transform: rotateY(180deg); } }
@keyframes tag-back { to { transform: rotateY(0); } }

[data-gift-scene="star"] {
    --scene-button: #1c3656;
    background: radial-gradient(ellipse at 48% 46%, #375476, #192e51 52%, #11213a 94%);
}
.scene-art .sky-chart {
    inset: 0;
    opacity: .67;
    background: radial-gradient(circle at 11% 34%, #bfd3ea 0 1px, #fff0 2px),
        radial-gradient(circle at 20% 58%, #bfd3eab0 0 1px, #fff0 2px),
        radial-gradient(circle at 31% 16%, #bfd3ead1 0 1px, #fff0 2px),
        radial-gradient(circle at 70% 24%, #e9d8a9 0 1px, #fff0 2px),
        radial-gradient(circle at 82% 58%, #bfd3ea 0 1px, #fff0 2px),
        radial-gradient(circle at 90% 36%, #bfd3eaa1 0 1px, #fff0 2px);
}
.scene-art .star-orbit {
    top: 50%; left: 50%;
    width: 200px; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 1px solid #d7bd7a7c;
    border-radius: 50%;
    box-shadow: inset 0 0 0 10px #162b4d9c, inset 0 0 0 11px #cbba8664, 0 0 0 12px #10244262;
}
.scene-art .star-orbit::before {
    content: ""; position: absolute; inset: 2px; border-radius: 50%;
    background: repeating-conic-gradient(#dcc68c 0deg 1deg, transparent 1deg 10deg);
    mask-image: radial-gradient(closest-side, transparent calc(100% - 5px), black calc(100% - 4px));
}
.scene-art .star-points { position: absolute; width: 196px; height: 196px; inset: 50% auto auto 50%; transform: translate(-50%, -50%); }
.scene-art .star-points i {
    inset: 50% auto auto 50%;
    width: var(--reach); height: 1px;
    transform-origin: left center;
    transform: rotate(var(--bearing));
    background: linear-gradient(90deg, #fff0, #dfbf78aa);
}
.scene-art .star-points i::after {
    content: ""; position: absolute; right: -3px; top: -2px;
    width: 5px; aspect-ratio: 1; border-radius: 50%;
    background: #f5dd9d;
    box-shadow: 0 0 8px #e9b949;
}
.scene-art .star-points i:nth-child(1) { --reach: 84px; --bearing: -90deg; --beat: .25s; }
.scene-art .star-points i:nth-child(2) { --reach: 72px; --bearing: -29deg; --beat: .65s; }
.scene-art .star-points i:nth-child(3) { --reach: 67px; --bearing: 18deg; --beat: 1.05s; }
.scene-art .star-points i:nth-child(4) { --reach: 83px; --bearing: 86deg; --beat: 1.44s; }
.scene-art .star-points i:nth-child(5) { --reach: 75px; --bearing: 149deg; --beat: 1.84s; }
.scene-art .star-points i:nth-child(6) { --reach: 69px; --bearing: 206deg; --beat: 2.28s; }
.scene-art .north-star {
    top: 50%; left: 50%;
    width: 97px; height: 120px;
    transform: translate(-50%, -50%) scale(.26);
    background: conic-gradient(from 15deg, #f0c77c, #ae7630, #fff4c7, #ddae5d, #fff2c3, #f0c77c);
    clip-path: polygon(50% 0, 58% 38%, 82% 24%, 68% 43%, 100% 50%, 68% 57%, 82% 76%, 58% 62%, 50% 100%, 42% 62%, 18% 76%, 32% 57%, 0 50%, 32% 43%, 18% 24%, 42% 38%);
}
.scene-playing .star-points i { animation: chart-ray .42s var(--beat) ease-out both; }
.scene-playing .star-orbit { animation: chart-focus 3.25s ease-out both; }
.scene-playing .north-star { animation: star-arrives .8s 2.64s cubic-bezier(.14,.62,.2,1) both; }
@keyframes chart-ray { from { opacity: 0; transform: rotate(var(--bearing)) scaleX(.02); } to { opacity: 1; transform: rotate(var(--bearing)) scaleX(1); } }
@keyframes chart-focus { from { opacity: .28; scale: .88; } to { opacity: 1; scale: 1; } }
@keyframes star-arrives { from { transform: translate(-50%, -50%) scale(.2) rotate(-21deg); } to { transform: translate(-50%, -50%) scale(1) rotate(0); } }

[data-gift-scene="rail"] {
    --scene-button: #214b54;
    background: linear-gradient(#255068, #739398 68%, #a6aca1);
}
.scene-art .rail-hill {
    inset: 54% 0 0;
    background: linear-gradient(151deg, #d6e5d6, #859c97);
    clip-path: polygon(0 17%, 9% 12%, 25% 26%, 44% 13%, 63% 20%, 80% 5%, 100% 12%, 100% 100%, 0 100%);
}
.scene-art .rail-track {
    inset: 71% 0 auto; height: 22px;
    transform: rotate(-1deg);
    border-block: 3px solid #234145;
    background: repeating-linear-gradient(90deg, #536061 0 11px, #a5aaa1 11px 23px);
    box-shadow: 0 5px 7px #202d394a;
}
.scene-art .train {
    position: absolute;
    inset: calc(71% - 103px) auto auto 50%;
    width: 262px; height: 116px;
    transform: translateX(-50%);
    filter: drop-shadow(4px 8px 7px #1833396e);
}
.scene-art .train .engine {
    top: 37%; left: 4%; width: 55%; height: 39%;
    border: 1px solid #0e483e; border-radius: 31px 6px 4px 4px;
    background: linear-gradient(#297565, #0d604d 47%, #123b40);
    box-shadow: inset 0 2px 0 #bed4bd76;
}
.scene-art .engine::before, .scene-art .engine::after { content: ""; position: absolute; }
.scene-art .engine::before {
    left: 14%; top: -26px; width: 18px; height: 31px;
    border: 1px solid #542b31;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(90deg, #8a2534, #d85348, #802b34);
}
.scene-art .engine::after {
    right: 0; top: -28px; width: 48px; height: 64px;
    border: 1px solid #0f3b35; border-top: 5px solid #d5ac6a;
    border-radius: 8px 8px 1px 1px;
    background: linear-gradient(118deg, #bad7cd, #7eada9 46%, #e4e3b2 47%, #8db3a9 54%) center 8px / 57% 19px no-repeat, linear-gradient(#5d9c76, #0d604d);
    box-shadow: inset 0 0 0 8px #144f43;
}
.scene-art .carriage {
    left: 61%; right: 1%; top: 57%; height: 24%;
    border: 1px solid #842938;
    border-radius: 4px;
    background: linear-gradient(#ed6450, #aa2f3c);
    box-shadow: inset 0 3px 0 #f0af756b;
}
.scene-art .carriage::before { content: ''; position: absolute; left: -20%; top: 65%; width: 20%; height: 5px; background: #32454a; }
.scene-art .rail-parcel {
    top: 21%; left: 68%; width: 61px; height: 48px;
    border: 1px solid #9b743f; border-radius: 4px;
    background: linear-gradient(90deg, #fff0 42%, #b12e39 42% 56%, #fff0 56%), linear-gradient(#f9e1a2, #d4a650);
}
.scene-art .wheels {
    inset: 65% 0 4% 4%;
    background: radial-gradient(circle at 9% 50%, #cbb378 0 4px, #354647 5px 12px, #132b32 13px 14px, #fff0 15px),
        radial-gradient(circle at 24% 50%, #cbb378 0 4px, #354647 5px 12px, #132b32 13px 14px, #fff0 15px),
        radial-gradient(circle at 43% 50%, #cbb378 0 4px, #354647 5px 12px, #132b32 13px 14px, #fff0 15px),
        radial-gradient(circle at 69% 57%, #cbb378 0 3px, #354647 4px 9px, #132b32 10px 11px, #fff0 12px),
        radial-gradient(circle at 91% 57%, #cbb378 0 3px, #354647 4px 9px, #132b32 10px 11px, #fff0 12px);
}
.scene-art .steam {
    left: 12%; top: -24%; width: 93px; height: 52px;
    background: radial-gradient(ellipse at 22% 79%, #eaf5e0ad, #fff0 22%),
        radial-gradient(ellipse at 43% 58%, #edf5e7b3, #fff0 26%),
        radial-gradient(ellipse at 74% 34%, #e1eee5b0, #fff0 28%);
    opacity: 0;
}
.scene-playing .train { animation: train-arrives 2.74s cubic-bezier(.11,.62,.26,1) both; }
.scene-playing .steam { animation: steam-puff .84s 2.51s ease-out both; }
@keyframes train-arrives {
    from { transform: translateX(min(65vw, 780px)); }
    72% { transform: translateX(-54%); }
    to { transform: translateX(-50%); }
}
@keyframes steam-puff { 25% { opacity: 1; } to { translate: 25px -24px; opacity: 0; } }

[data-gift-scene="fir"] {
    --scene-button: #0a4f3f;
    background: repeating-linear-gradient(115deg, #ffffff19 0 1px, #fff0 1px 5px), radial-gradient(ellipse at 46% 43%, #dbe8cd, #98b29b 74%, #6f8c80);
}
.scene-art .fir-shadow { width: 220px; height: 42px; top: calc(25% + 148px); left: 50%; transform: translate(-50%, 0); border-radius: 50%; background: radial-gradient(#1a574b80, #1a574b00 66%); }
.scene-art .fir-trunk {
    top: calc(25% + 140px); left: 50%; width: 32px; height: 34px; transform: translateX(-50%);
    background: linear-gradient(90deg, #967348, #aa824b 49%, #705739 50%);
    clip-path: polygon(17% 0, 83% 0, 100% 100%, 0 100%);
}
.scene-art .paper-tree { position: absolute; top: 25%; left: 50%; width: 213px; height: 151px; transform: translateX(-50%); perspective: 470px; }
.scene-art .paper-tree i {
    bottom: var(--tier); left: 50%;
    width: var(--tier-width); height: 83px;
    transform: translateX(-50%);
    transform-origin: 50% 100%;
    clip-path: polygon(50% 0, 100% 87%, 52% 100%, 48% 100%, 0 87%);
    background: linear-gradient(90deg, #2d795e, #146950 49%, #073e35 50%, #145944);
}
.scene-art .paper-tree i:nth-child(1) { --tier: 0%; --tier-width: 100%; --fold: .47s; }
.scene-art .paper-tree i:nth-child(2) { --tier: 27%; --tier-width: 77%; --fold: 1.18s; }
.scene-art .paper-tree i:nth-child(3) { --tier: 50%; --tier-width: 49%; --fold: 1.94s; background: linear-gradient(90deg, #4c9370, #328462 49%, #0c4b3d 50%, #126650); }
.scene-art .fir-star {
    top: calc(25% - 28px); left: 50%;
    width: 36px; aspect-ratio: 1;
    transform: translateX(-50%);
    clip-path: polygon(50% 0, 61% 37%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 37%);
    background: conic-gradient(#ffe9ab, #c48533, #e9b949, #ffdb82, #ffe9ab);
}
.scene-playing .paper-tree i { animation: unfold-fir .69s var(--fold) ease-out both; }
.scene-playing .fir-star { animation: crown-fir .73s 2.71s ease-out both; }
@keyframes unfold-fir {
    from { opacity: 0; transform: translateX(-50%) rotateX(-85deg) scaleX(.58); }
    56% { opacity: 1; transform: translateX(-50%) rotateX(13deg); }
    to { transform: translateX(-50%); }
}
@keyframes crown-fir { from { opacity: 0; scale: .2; rotate: -25deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }

[data-gift-scene="tin"] {
    --scene-ink: #fff7e6;
    --scene-button: #722e3c;
    background: repeating-linear-gradient(32deg, #fff0 0 4px, #93644f26 4px 5px), radial-gradient(ellipse at 47% 40%, #efd4a6, #b78766);
}
.scene-art .tin-base, .scene-art .tin-lid {
    position: absolute;
    top: 51%; left: 50%;
    width: min(50%, 178px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%) scaleY(.84);
    border: 4px solid #af713b;
    border-radius: 50%;
}
.scene-art .tin-base {
    background: radial-gradient(#efe0b8 53%, #a43541 55% 65%, #e6bd6a 68% 70%, #dda25a);
    box-shadow: 2px 12px 0 #782e37, 4px 17px 10px #59303282, inset 0 0 0 3px #f7d486;
}
.scene-art .tin-lid {
    background: radial-gradient(#b83641 40%, #ffe1a2 41% 42%, #a72537 43% 62%, #eabd78 63% 64%, #b53540 65%);
    box-shadow: 1px 7px 0 #7c2736, 4px 13px 12px #682d3878, inset 0 0 0 2px #ffce7e;
}
.scene-art .tin-lid::before {
    content: "";
    position: absolute;
    inset: 29%;
    background: linear-gradient(130deg, #fff1b8, #d9aa62 70%);
    clip-path: polygon(50% 0, 57% 31%, 85% 14%, 69% 42%, 100% 50%, 69% 58%, 85% 85%, 57% 70%, 50% 100%, 43% 70%, 15% 85%, 31% 58%, 0 50%, 31% 42%, 15% 14%, 43% 31%);
}
.scene-art .cookie { width: 29%; aspect-ratio: 1; background: radial-gradient(circle at 28% 43%, #8b532d 0 2px, #fff0 3px), radial-gradient(circle at 68% 53%, #a46636 0 2px, #fff0 3px), radial-gradient(ellipse, #f3bc70, #c38248); filter: drop-shadow(0 3px 2px #48302588); }
.scene-art .tree-cookie::after {
    content: ""; position: absolute; inset: 20% 8%;
    background: repeating-linear-gradient(16deg, transparent 0 7px, #fff0c7 8px 10px, transparent 11px 14px);
}
.scene-art .star-cookie { left: 19%; top: 22%; clip-path: polygon(50% 0, 62% 32%, 99% 34%, 71% 58%, 80% 98%, 50% 75%, 20% 98%, 29% 58%, 1% 34%, 38% 32%); rotate: -12deg; }
.scene-art .round-cookie { left: 53%; top: 21%; border-radius: 50%; border: 2px dotted #9f5f34; }
.scene-art .tree-cookie { left: 25%; top: 52%; rotate: -16deg; clip-path: polygon(50% 0, 72% 34%, 65% 34%, 86% 61%, 75% 61%, 99% 85%, 59% 85%, 59% 100%, 41% 100%, 41% 85%, 1% 85%, 25% 61%, 14% 61%, 35% 34%, 28% 34%); }
.scene-art .small-cookie { left: 57%; top: 56%; width: 23%; border-radius: 50%; border: 2px dotted #aa6534; }
.scene-playing .tin-lid { animation: lift-lid 2.8s .2s cubic-bezier(.34,.21,.2,1) both; }
.scene-playing .tin-base { animation: turn-tin 1.28s 1.62s ease-out both; }
@keyframes lift-lid {
    22% { transform: translate(-50%, -58%) scaleY(.84) rotate(-10deg); }
    47% { transform: translate(-30%, -98%) scaleY(.9) rotate(17deg); }
    to { transform: translate(55%, -115%) scaleY(.82) rotate(33deg); opacity: 0; }
}
@keyframes turn-tin {
    from { transform: translate(-50%, -50%) scaleY(.84) rotate(-26deg); }
    to { transform: translate(-54%, -43%) scale(1.14) rotate(8deg); }
}

[data-gift-scene="radio"] {
    --scene-button: #233f38;
    background: repeating-linear-gradient(99deg, #fff0 0 3px, #f5fbfd14 4px, #fff0 5px), radial-gradient(ellipse at 48% 40%, #688c72, #254d47 68%, #203b39);
}
.scene-art .radio-case {
    position: absolute;
    inset: 49% auto auto 50%;
    width: min(72%, 310px); height: 138px;
    transform: translate(-50%, -50%);
    border: 3px solid #4b382b;
    border-radius: 31px 31px 22px 22px;
    background: repeating-linear-gradient(7deg, #a4694622 0 2px, #fff0 2px 5px), linear-gradient(#a0734c, #65452f);
    box-shadow: inset 0 0 0 2px #ce9b64, 0 12px 0 -6px #3e342e, 7px 15px 19px #0d2b32bf;
}
.scene-art .speaker {
    inset: 15% 57% 16% 7%;
    border: 2px solid #d3a374; border-radius: 19px;
    background: repeating-linear-gradient(90deg, transparent 0 2px, #ce9b6433 2px 3px), repeating-linear-gradient(0deg, #372e28 0 2px, #6d5140 3px 6px);
    box-shadow: inset 0 0 7px #38231d;
}
.scene-art .dial {
    top: 18%; left: 49%; right: 8%; height: 36%;
    overflow: hidden;
    border: 2px solid #554238; border-radius: 8px;
    background: linear-gradient(#aa804f, #ded0a3 45%, #b9a070);
    box-shadow: inset 0 0 0 2px #ead5a7;
}
.scene-art .dial::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse, #fff3b2, #fcb84c 75%);
    opacity: .24;
}
.scene-art .dial::after {
    content: ""; position: absolute; inset: 22% 10% 50%;
    background: repeating-linear-gradient(90deg, #674a32 0 1px, #fff0 1px 9%);
    box-shadow: 0 1px #775945;
}
.scene-art .dial b { inset: 16% auto 14% 15%; width: 2px; background: #a92432; z-index: 1; }
.scene-art .knob {
    bottom: 12%; left: 52%; width: 29px; aspect-ratio: 1;
    border: 1px solid #503e35; border-radius: 50%;
    background: conic-gradient(#c9a77a, #695141, #dfb789, #795849, #c9a77a);
    box-shadow: 0 2px 4px #362820;
}
.scene-art .knob::before { content: ""; position: absolute; inset: 4px 48% 57%; background: #5b4335; }
.scene-art .knob.small { left: auto; right: 12%; width: 22px; bottom: 14%; }
.scene-playing .dial b { animation: find-station 3.43s linear both; }
.scene-playing .dial::before { animation: station-light 3.48s linear both; }
.scene-playing .knob:not(.small) { animation: tune 3.43s linear both; }
@keyframes find-station {
    16% { left: 37%; } 24% { left: 30%; } 40% { left: 68%; } 52% { left: 59%; } 70% { left: 84%; }
    83%, 100% { left: 72%; }
}
@keyframes station-light {
    24% { opacity: .51; } 37% { opacity: .24; } 54% { opacity: .62; } 67% { opacity: .33; } 83%, 100% { opacity: 1; }
}
@keyframes tune {
    16% { rotate: 47deg; } 24% { rotate: 35deg; } 40% { rotate: 92deg; } 52% { rotate: 82deg; } 70% { rotate: 135deg; } 83%, 100% { rotate: 111deg; }
}

[data-gift-scene="curtain"] {
    --scene-button: #482734;
    background: radial-gradient(ellipse at 50% 75%, #633e3c, #25283c 56%, #1c2335);
}
.scene-art .stage-floor {
    inset: 73% 0 0;
    background: repeating-linear-gradient(94deg, #f5cf9b1b 0 1px, #fff0 1px 33px), linear-gradient(#502f2c, #302535);
    border-top: 2px solid #ad85586e;
}
.scene-art .stage-light {
    inset: 0;
    background: radial-gradient(ellipse at 50% 73%, #ffe09aab, #e9b94944 24%, #cf793619 48%, #fff0 71%);
    opacity: .28;
}
.scene-art .stage-light::after {
    content: ""; position: absolute; inset: 5% 0 17%;
    background: linear-gradient(#fff2bb4a, #fbd28a12);
    clip-path: polygon(49% 0, 51% 0, 73% 97%, 68% 100%, 32% 100%, 27% 97%);
}
.scene-art .drape {
    z-index: 1;
    inset: 0 49% 0 0;
    border-right: 2px solid #bb775f;
    border-bottom: 4px solid #d3a974;
    border-radius: 0 0 6% 0;
    background: repeating-linear-gradient(90deg, #4b202e80 0 7%, #b33b4a45 12% 17%, #51202b99 24%),
        linear-gradient(#632736, #a03247 42%, #502230);
    box-shadow: 6px 0 13px #261c2ea0;
}
.scene-art .drape.right { inset: 0 0 0 49%; border-right: 0; border-left: 2px solid #bb775f; border-radius: 0 0 0 6%; }
.scene-art .pelmet {
    z-index: 2; inset: 0 0 auto; height: 11%;
    border-bottom: 2px solid #d0a874;
    background: radial-gradient(circle, #ffe4a6 0 2px, #b78454 3px, transparent 4px) center / 38px 100%, linear-gradient(#612837, #812e3c 64%, #6b2c39);
    box-shadow: 0 4px 9px #301d2ca3;
}
.scene-playing .drape { animation: draw-curtain 2.64s .58s cubic-bezier(.61,.02,.25,1) both; }
.scene-playing .drape.right { animation-name: draw-curtain-right; }
.scene-playing .stage-light { animation: theater-light 1.45s 1.88s ease-out both; }
@keyframes draw-curtain { 13% { translate: -4% 0; } to { translate: -77% 0; } }
@keyframes draw-curtain-right { 13% { translate: 4% 0; } to { translate: 77% 0; } }
@keyframes theater-light { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .gift-scene .scene-art, .gift-scene .scene-art * { animation: none !important; }
}
