/* Noël réaliste V13 — les couleurs natives restent intactes. */
.xmas-realistic-layer,.xmas-realistic-layer *,.xmas-realistic-decoration,.xmas-realistic-decoration *{pointer-events:none!important;user-select:none!important}
.xmas-realistic-position{position:relative}
.xmas-realistic-layer{position:fixed;inset:0;z-index:70;overflow:hidden;isolation:isolate;contain:strict}
.xmas-realistic-layer::before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 5% 3%,#ffba6521,transparent 33%),radial-gradient(ellipse at 98% 18%,#e6c38b13,transparent 35%);pointer-events:none}
.xmas-realistic-snow{position:absolute;inset:0;width:100%;height:100%;display:block}
.xmas-realistic-garland{position:absolute;left:0;right:0;top:0;height:34px;display:flex;justify-content:center;overflow:hidden}
.xmas-realistic-garland svg{width:100%;max-width:1180px;height:100%;display:block}
.xmas-realistic-led{animation:xmas-realistic-glow var(--xmas-realistic-duration,4s) ease-in-out infinite;animation-delay:var(--xmas-realistic-delay,0s)}
@keyframes xmas-realistic-glow{0%,100%{opacity:.59}46%{opacity:1}71%{opacity:.83}}
/* Givre cristallin en bordure uniquement, sans voile sur les textes. */
.xmas-realistic-frost{position:absolute;left:0;right:0;top:0;height:17px;z-index:2;border-radius:inherit;overflow:hidden;opacity:.78;mask-image:linear-gradient(#000 0%,#000 24%,transparent 100%);background:linear-gradient(180deg,#f4faff23,transparent 65%);backdrop-filter:blur(12px);box-shadow:inset 0 1px 0 #fff6}
.xmas-realistic-frost img{display:block;width:100%;height:100%;object-fit:fill;opacity:.92}
.xmas-realistic-pine,.xmas-realistic-header-pine{position:absolute;top:-5px;right:0;width:clamp(37px,9%,66px);height:auto;z-index:3;opacity:.9;filter:drop-shadow(0 2px 3px #170b0b80)}
.xmas-realistic-pine img,.xmas-realistic-header-pine img{display:block;width:100%;height:auto;object-fit:contain}
.xmas-realistic-header-pine{width:41px;right:38px;top:0;opacity:.78}
/* The photo brim overlaps the avatar's upper rim; real transparency and
   soft contact shadow visually join the ornament to the host. */
.xmas-realistic-avatar-hat,.xmas-realistic-logo-hat{position:absolute;left:var(--xmas-realistic-hat-x,0);top:var(--xmas-realistic-hat-y,0);width:var(--xmas-realistic-hat-w,36px);aspect-ratio:240/176;z-index:4;filter:drop-shadow(0 2px 1px #1c0a1280);transform:rotate(-8deg);transform-origin:50% 80%}
.xmas-realistic-avatar-hat img,.xmas-realistic-logo-hat img{width:100%;height:100%;display:block;object-fit:contain}
.xmas-realistic-logo-hat{transform:rotate(-12deg)}
.xmas-realistic-avatar-hat::after{content:"";position:absolute;left:6%;right:25%;height:10%;bottom:16%;border-radius:50%;background:radial-gradient(ellipse,#10000835,transparent 70%);z-index:-1}
.xmas-realistic-flight{position:absolute;left:0;top:32px;width:clamp(150px,31vw,330px);animation:xmas-realistic-fly 6.6s linear both;filter:drop-shadow(0 2px 5px #ffc5783b)}
.xmas-realistic-flight img{width:100%;height:auto;display:block}
@keyframes xmas-realistic-fly{0%{transform:translate3d(-110%,66px,0) rotate(-7deg);opacity:0}10%{opacity:1}30%{transform:translate3d(calc(30vw - 50%),40px,0) rotate(-4deg)}67%{transform:translate3d(calc(67vw - 40%),9px,0) rotate(-7deg)}90%{opacity:1}100%{transform:translate3d(calc(100vw + 8px),-24px,0) rotate(-8deg);opacity:0}}
.xmas-realistic-trail{position:absolute;left:calc(-2% - var(--xmas-realistic-i)*4%);top:calc(62% + var(--xmas-realistic-i)*2%);width:6px;height:6px;background:radial-gradient(circle,#fffbe8 0 15%,#ffd99b 30%,transparent 70%);animation:xmas-realistic-trail 1.3s ease-out infinite;animation-delay:calc(var(--xmas-realistic-i)*-.14s)}
@keyframes xmas-realistic-trail{0%{opacity:.15;transform:scale(.5)}45%{opacity:1;transform:scale(1.25)}100%{opacity:0;transform:translate(-9px,6px) scale(.5)}}
.xmas-realistic-elf{position:absolute;right:0;bottom:22%;width:clamp(86px,12vw,145px);animation:xmas-realistic-elf-right 5.2s ease-in-out both;filter:drop-shadow(0 3px 6px #12000966)}
.xmas-realistic-elf img{width:100%;height:auto;display:block;animation:xmas-realistic-peek 1.8s ease-in-out infinite;transform-origin:right 72%}
.xmas-realistic-elf.xmas-realistic-right{left:0;right:auto;animation-name:xmas-realistic-elf-left}
.xmas-realistic-elf.xmas-realistic-right img{transform:scaleX(-1);animation-name:xmas-realistic-peek-left;transform-origin:center 72%}
@keyframes xmas-realistic-elf-right{0%,100%{transform:translateX(105%);opacity:0}17%,81%{transform:translateX(0);opacity:1}}
@keyframes xmas-realistic-elf-left{0%,100%{transform:translateX(-105%);opacity:0}17%,81%{transform:translateX(0);opacity:1}}
@keyframes xmas-realistic-peek{0%,100%{transform:rotate(0)}50%{transform:rotate(-2deg)}}
@keyframes xmas-realistic-peek-left{0%,100%{transform:scaleX(-1) rotate(0)}50%{transform:scaleX(-1) rotate(2deg)}}
.xmas-realistic-burst{position:fixed;width:0;height:0;z-index:2147483000}
.xmas-realistic-ring{position:absolute;width:24px;height:24px;margin:-12px;border:1px solid #f8d894;border-radius:50%;animation:xmas-realistic-ring .43s ease-out both;box-shadow:0 0 5px #f6bc6570}
.xmas-realistic-spark{position:absolute;width:6px;height:6px;margin:-3px;background:radial-gradient(circle,#fff8d7 0 20%,#f4c37a 35%,transparent 72%);animation:xmas-realistic-spark .44s ease-out both}
@keyframes xmas-realistic-ring{from{transform:scale(.3);opacity:.9}to{transform:scale(2);opacity:0}}
@keyframes xmas-realistic-spark{from{transform:scale(.4);opacity:1}to{transform:translate(var(--xmas-realistic-dx),var(--xmas-realistic-dy)) scale(.4);opacity:0}}
.xmas-realistic-settings{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line,#ba9a7544);color:var(--text,inherit);font:inherit;text-align:left}
.xmas-realistic-settings span{min-width:0;display:grid;gap:3px}.xmas-realistic-settings strong{font-size:13px;font-weight:600}.xmas-realistic-settings small{font-size:11px;color:var(--text-dim,inherit)}.xmas-realistic-settings input{width:20px;height:20px;flex:0 0 20px;accent-color:var(--gold,#c9a06a);cursor:pointer}
.xmas-realistic-motion-off .xmas-realistic-led{animation:none!important}.xmas-realistic-motion-off .xmas-realistic-snow,.xmas-realistic-motion-off .xmas-realistic-flight,.xmas-realistic-motion-off .xmas-realistic-elf,.xmas-realistic-motion-off .xmas-realistic-burst{display:none!important}
.xmas-realistic-paused .xmas-realistic-layer *,.xmas-realistic-paused .xmas-realistic-decoration{animation-play-state:paused!important}
@media(max-width:479px){.xmas-realistic-garland{height:25px}.xmas-realistic-frost{height:12px;backdrop-filter:none}.xmas-realistic-pine{width:34px;top:0}.xmas-realistic-header-pine{width:28px;right:32px}.xmas-realistic-flight{width:45vw;top:36px}.xmas-realistic-elf{width:90px;bottom:22%}}
@media(prefers-reduced-motion:reduce){.xmas-realistic-led{animation:none!important}.xmas-realistic-snow,.xmas-realistic-flight,.xmas-realistic-elf,.xmas-realistic-burst{display:none!important}}
/* Prevent the existing avatar image styles from turning the hat into a second portrait. */
#app .xmas-realistic-avatar-hat img,#app .xmas-realistic-logo-hat img{border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;object-fit:contain!important;padding:0!important;display:block!important;width:100%!important;height:100%!important;filter:none!important}

/* V13 — bonnet HD sur la capsule native, sans toucher au verre ni au sceau. */
#app .xmas-realistic-capsule-hat{position:absolute;left:var(--xmas-realistic-cap-hat-x);top:var(--xmas-realistic-cap-hat-y);width:var(--xmas-realistic-cap-hat-w);height:auto;aspect-ratio:240/176;display:block;z-index:5;transform:rotate(-5deg);transform-origin:40% 75%;filter:drop-shadow(0 2px 2px #200a13a0);pointer-events:none!important;transition:opacity .18s ease}
#app .xmas-realistic-capsule-hat img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;border:0!important;border-radius:0!important;background:transparent!important;padding:0!important;box-shadow:none!important;filter:none!important;pointer-events:none!important}
/* A thumbnail needs a little headroom for the brim, while its aura stays inside. */
#app .cap-card-visual:has(> .capsule-object > .xmas-realistic-capsule-hat){overflow:visible}
#app .cap-card-visual:has(> .capsule-object > .xmas-realistic-capsule-hat)::before{inset:0}
/* No floating hat over an opening/revealed secret. */
#app :is(.is-revealing,.reveal-stage-opening) .xmas-realistic-capsule-hat{opacity:0;visibility:hidden}
@media(prefers-reduced-motion:reduce){#app .xmas-realistic-capsule-hat{transition:none}}
