/* Treasure depth: the pile stays crisp and spills into the sea on three sides,
   pouring toward the works strip as the visitor scrolls down. */
.ocean-treasure{--treasure-src:url('assets/rumi-treasure-v8.webp');--spill:var(--discovery-opacity,0)}

/* The white haze is cleaned out of the image, so no fade is needed over Neo and Trinity. */
.treasure-personal .treasure-art{mask-image:none;-webkit-mask-image:none;mix-blend-mode:normal}

/* The gold rim's dissolve is baked into the image itself, so the characters stay untouched.
   Neutralise the older full-image masks and overlay layers from studio.css. */
.ocean-treasure.treasure-personal .treasure-art>img:not(.treasure-spill){position:relative;z-index:1;clip-path:none;mask-image:none;-webkit-mask-image:none}
.treasure-personal .treasure-art:before,.treasure-personal .treasure-art:after{content:none;display:none}

/* Coin spill (built from coins in the pile itself), anchored to the image box so it tracks the
   pile at every width: wider and deeper than the pile, reaching down toward the works strip. */
.ocean-treasure .treasure-art>img.treasure-spill{position:absolute;z-index:0;left:-20%;top:0;width:140%;height:auto;max-width:none;pointer-events:none;
 transform-origin:50% 62%;
 transform:translateY(calc(var(--spill) * 14px)) scale(calc(.94 + var(--spill) * .06));
 opacity:var(--spill);
 mask-image:linear-gradient(to bottom,#000 52%,#0009 57%,#0003 63%,transparent 69%);-webkit-mask-image:linear-gradient(to bottom,#000 52%,#0009 57%,#0003 63%,transparent 69%)}
@media(prefers-reduced-motion:reduce){.ocean-treasure .treasure-art>img.treasure-spill{transform:none}}

/* The spill is wider than the screen on phones: clip it sideways only, so it can still pour down. */
.cinema-hero{overflow-x:clip}

/* Lift the whole scene 20px so the White Rabbit clears the works strip. */
.ocean-treasure{translate:0 calc(-20px - 14%)}

/* cinema.js caps the reveal at 0.82, which lets the sea wash through the whole scene; reach full opacity instead. */
.ocean-treasure{opacity:min(1,calc(var(--treasure-opacity,0) / .82))}
