/* Keep the moving atmosphere behind the transparent 3D scene so products stay crisp. */
.storyboard .world-wrap>.late-atmosphere{position:absolute;inset:0;width:100%;height:100%;z-index:2;opacity:0;pointer-events:none;contain:strict}
.storyboard .world-wrap>.poster{z-index:1}
.storyboard .world-wrap>#world{z-index:3}
.storyboard .world-wrap>.story-pack{z-index:5}
.storyboard #background-life{z-index:6;opacity:calc(.70 * (1 - var(--late-atmosphere,0)))!important}
.storyboard .world-wrap>.vignette{z-index:7;pointer-events:none}
.storyboard #toothpaste:before,.storyboard #benefits:before,.storyboard #products:before{background:linear-gradient(270deg,#071d17b3,transparent 74%)!important}
.storyboard #meswaknama:before{background:linear-gradient(90deg,#101d16b3,transparent 72%)!important}
.storyboard #products .closing-collection{background:transparent!important;border-top:1px solid #d0d9b72b}
.storyboard #products .catalogue-glow{background:radial-gradient(ellipse,#bfa36124,transparent 68%)}
.storyboard #meswaknama #campaign-library .campaign-card{background:linear-gradient(145deg,#7a6e4c25,#071c17b3);border-color:#e8d9b53b;backdrop-filter:blur(10px)}
.storyboard #meswaknama #campaign-library .campaign-card.is-featured{background:linear-gradient(145deg,#b99c5f30,#09291eaf);border-color:#e6c98e82}
.storyboard #meswaknama #campaign-library .campaign-card:hover{border-color:#f4dbab;background-color:#b19d6021}
.storyboard #toothpaste :is(h2,h3),.storyboard #benefits :is(h2,h3),.storyboard #products :is(h2,h3){text-shadow:0 2px 22px #001b1670}
.storyboard footer{background:linear-gradient(#061d19de,#061914);border-top:1px solid #c9d2b226}
@media(max-width:1100px){.storyboard #toothpaste:before,.storyboard #benefits:before,.storyboard #products:before,.storyboard #meswaknama:before{background:linear-gradient(180deg,#061d17b3,transparent 82%)!important}}
@media(prefers-reduced-motion:reduce){.storyboard .late-atmosphere{transition:none}}

.storyboard #toothpaste .story-steps{color:#e3dcc3}.storyboard #toothpaste .story-steps span{opacity:1;color:#ded5ba}.storyboard #toothpaste .story-steps strong{color:#fff5df}

/* Single packaging-derived ring; the ingredient controls retain their own accessible targets. */
.storyboard .world-wrap>.pack-ring-native{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;contain:strict}


/* Let the moving constellation read through film placeholders while titles retain a dark base. */
.storyboard #meswaknama #campaign-library .campaign-card{background:linear-gradient(145deg,#0c241b35,#071c1773);backdrop-filter:blur(2px)}
.storyboard #meswaknama #campaign-library .campaign-card.is-featured{background:linear-gradient(145deg,#0c241b45,#071c1778)}
.storyboard #products .closing-collection .catalogue-card{backdrop-filter:blur(2px)}

/* The restored ring is a background sibling, never above the pack or hotspot controls. */
.storyboard .world-wrap>.pack-ring-restored{display:block!important;position:absolute;z-index:2;left:var(--orbit-x,30%);top:var(--orbit-y,53%);width:var(--orbit-size,420px);height:var(--orbit-size,420px);border:0;background:none;box-shadow:none;opacity:1;pointer-events:none;transform:translate(-50%,-50%) rotate(var(--ring-angle,0deg));transition:none;overflow:visible}
.storyboard .world-wrap>.pack-ring-restored[hidden]{display:none!important}
.pack-ring-restored:before,.pack-ring-restored:after{content:'';position:absolute;inset:0;border-radius:50%;pointer-events:none}
.pack-ring-restored:before{background:conic-gradient(from 0deg,#ffe7a0,#d99b22 13%,#263e21 26%,#078442 40%,#12c766 55%,#035c36 70%,#b78322 84%,#ffe7a0);mask:radial-gradient(closest-side,transparent 75%,#000 78%,#000 97%,transparent 100%);-webkit-mask:radial-gradient(closest-side,transparent 75%,#000 78%,#000 97%,transparent 100%);filter:drop-shadow(0 0 7px #c9e56e80) drop-shadow(0 0 15px #08aa4c55)}
.pack-ring-restored:after{background:conic-gradient(#fff1bc,#bb8d2c,#18b968,#9ff5b0,#07603b,#ebc05c,#fff1bc);mask:radial-gradient(closest-side,transparent 77%,#000 78%,transparent 79%,transparent 94%,#000 95%,transparent 97%);-webkit-mask:radial-gradient(closest-side,transparent 77%,#000 78%,transparent 79%,transparent 94%,#000 95%,transparent 97%);filter:drop-shadow(0 0 5px #b4ed83)}
.storyboard .pack-ring-restored .orbit-inner{display:none}
.storyboard .pack-ring-restored .orbit-sweep{inset:-1%;border:0;background:conic-gradient(transparent 0deg,transparent 16deg,#fff4a9d9 18deg,transparent 20deg,transparent 114deg,#8affbbbf 117deg,transparent 120deg,transparent 247deg,#ffdf8abf 250deg,transparent 253deg);mask:radial-gradient(closest-side,transparent 83%,#000 86%,#000 95%,transparent 100%);-webkit-mask:radial-gradient(closest-side,transparent 83%,#000 86%,#000 95%,transparent 100%);filter:blur(1px) drop-shadow(0 0 7px #e7f8b7);animation:orbit-light-turn 24s linear infinite}
.motion-paused .pack-ring-restored *{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.pack-ring-restored *{animation:none!important}}

/* Matching non-WebGL medallion fallback: emerald all round; gold is confined to rims. */
.storyboard .world-wrap>.pack-ring-restored{background:radial-gradient(circle,#e8b04a35 0%,#8b1e2d35 65%,transparent 83%);border-radius:50%}
.pack-ring-restored:before{background:radial-gradient(closest-side,transparent 82%,#d4a63a 83%,#f5d98a 84%,#075d2d 85%,#0b7a3b 87%,#16a34a 91%,#0a7037 95%,#064b26 97%,#f5d98a 98%,#d4a63a 99%,transparent 100%);mask:radial-gradient(closest-side,transparent 82%,#000 83%);-webkit-mask:radial-gradient(closest-side,transparent 82%,#000 83%);filter:drop-shadow(0 0 6px #0d9b4e99)}
.pack-ring-restored:after{background:conic-gradient(transparent 0deg 112deg,#dcffe93b 135deg,transparent 162deg 258deg,#f6fff1bf 288deg,#fffdeca6 318deg,transparent 342deg);mask:radial-gradient(closest-side,transparent 86%,#000 89%,#000 94%,transparent 97%);-webkit-mask:radial-gradient(closest-side,transparent 86%,#000 89%,#000 94%,transparent 97%);filter:none}

/* Readable, consistently cased navigation without crowding the fixed header. */
.storyboard header #navigation{gap:clamp(14px,1.5vw,28px);font-size:1rem;white-space:nowrap}
.storyboard header #navigation a{text-transform:none;line-height:1.4;min-height:44px;display:flex;align-items:center}
@media(min-width:761px) and (max-width:1250px){.storyboard header{gap:12px;padding-left:3%;padding-right:3%}.storyboard header #navigation{gap:12px;font-size:.9375rem}.storyboard header .buy{padding:12px 15px}.storyboard header .buy span{margin-left:8px}}
@media(max-width:1000px){.storyboard header #navigation{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:stretch;background:#14261ff5;padding:20px 7%;font-size:1.0625rem;max-height:calc(100svh - 110px);overflow:auto}.storyboard header #navigation.open{display:flex}.storyboard header .menu{display:block;font-size:1rem}.storyboard header .buy{margin-left:auto}}
/* Fallback: soft packaging glow, dark depth, broken light and dotted exterior. */
.storyboard .pack-ring-restored:before{background:radial-gradient(closest-side,transparent 81%,#c9943233 82%,#f6dc8c99 83%,#063d21bb 85%,#10994ac9 89%,#0b6b38b3 93%,#12321cc9 96%,#dcae5580 98%,transparent 100%);filter:blur(.6px) drop-shadow(0 0 12px #25cb6e66)}
.storyboard .pack-ring-restored{box-shadow:0 0 30px #1bd26a26,inset 0 0 35px #180f0e99;background:radial-gradient(circle at 40% 38%,#d8b13233,#26432355 45%,#29180d88 70%,transparent 84%)}

/* Soften the fallback surface too: the light volume leads, never a thick border. */
.storyboard .pack-ring-restored:before{opacity:.40;filter:blur(2px) drop-shadow(0 0 20px #45eb6288)}
.storyboard .pack-ring-restored:after{mask:radial-gradient(closest-side,transparent 80%,#000 84%,#000 93%,transparent 100%);-webkit-mask:radial-gradient(closest-side,transparent 80%,#000 84%,#000 93%,transparent 100%);filter:blur(2px);box-shadow:0 0 30px #16cf6d55}

/* One soft light field, fine interior fragments and an inset shadow, never a border. */
.storyboard .world-wrap>.pack-ring-restored{background:none;box-shadow:none}
.storyboard .pack-ring-restored:before{background:radial-gradient(closest-side,transparent 64%,#2e7b2d08 74%,#40bb4928 85%,#aac24c1c 89%,#3689420b 96%,transparent 100%);mask:none;-webkit-mask:none;opacity:.8;filter:blur(5px);inset:-9%}
.storyboard .pack-ring-restored:after,.storyboard .pack-ring-restored .orbit-sweep{display:none}
.ring-interior-art{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.ring-fine-filament{stroke-linecap:round;filter:drop-shadow(0 0 .24px currentColor);animation:ring-fragment-breathe var(--ring-pulse-time,6s) ease-in-out infinite}
.ring-tiny-spark{animation:ring-spark-breathe var(--ring-pulse-time,5s) ease-in-out infinite}
@keyframes ring-fragment-breathe{0%,100%{opacity:0}28%{opacity:.12}51%{opacity:.9}72%{opacity:.20}88%{opacity:0}}
@keyframes ring-spark-breathe{0%,22%,100%{opacity:0}55%{opacity:.85}76%{opacity:.08}}
.motion-paused .ring-interior-art *,.hotspot-popup-open .ring-interior-art *,.meswak-modal-open .ring-interior-art *,.video-playing .ring-interior-art *{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.ring-interior-art *{animation:none!important;opacity:.45}}

/* Keep the fallback landscape subordinate to the fold-4 particle scene. */
.storyboard.webgl-failed .world-wrap>.poster{opacity:calc((1 - var(--late-atmosphere,0)) * (1 - var(--late-atmosphere,0)) * (1 - var(--late-atmosphere,0)))!important}

/* The supplied packaging is the source of the enlarged ring's colours and reflections. */
.storyboard .world-wrap>.pack-ring-restored .ring-pack-artwork{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;filter:drop-shadow(0 -4px 10px #d8a03338) drop-shadow(0 5px 12px #1bbe5e35)}
.storyboard .pack-ring-restored:before{opacity:.12}
.storyboard .pack-ring-restored .ring-interior-art{opacity:.62}

/* Light tracks and stars belong to the printed medallion's band. */
.pack-ring-light-tracks{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;mix-blend-mode:screen}
.pack-printed-track{stroke-linecap:round;animation:pack-track-reveal var(--ring-pulse-time,7s) ease-in-out infinite;filter:drop-shadow(0 0 .16px #efdf97)}
.pack-printed-star{animation:pack-star-glint var(--ring-pulse-time,5s) ease-in-out infinite}
.pack-ring-track-grain{animation:ring-spark-breathe var(--ring-pulse-time,6s) ease-in-out infinite}
.pack-ring-grain-stream{transform-origin:0 0;animation:pack-grain-orbit var(--grain-turn-time,90s) linear infinite}
@keyframes pack-track-reveal{0%,100%{opacity:0;stroke-dasharray:4 38;stroke-dashoffset:8}35%{opacity:.20}57%{opacity:.88;stroke-dasharray:17 26;stroke-dashoffset:0}83%{opacity:0;stroke-dashoffset:-9}}
@keyframes pack-star-glint{0%,19%,100%{opacity:0}44%{opacity:.24}57%{opacity:1}73%{opacity:.08}}
@keyframes pack-grain-orbit{to{transform:rotate(360deg)}}
.motion-paused .pack-ring-light-tracks *,.hotspot-popup-open .pack-ring-light-tracks *,.meswak-modal-open .pack-ring-light-tracks *,.video-playing .pack-ring-light-tracks *{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.pack-ring-light-tracks *{animation:none!important;opacity:.5}}
