/* =========================================================
   PREMIUM SEASCAPE REPAIR
   Build: 20260712-000256
   ========================================================= */

/*
  Keep the game scene as the positioning container.
  Do NOT change every child to position: relative.
*/
#scene,
.hr-premium-scene {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate !important;

    background:
        linear-gradient(
            180deg,
            #24163c 0%,
            #da684d 62%,
            #09172c 100%
        ) !important;
}

/*
  Disable the previous pseudo-element implementation.
*/
.hr-premium-scene::before,
.hr-premium-scene::after {
    content: none !important;
    display: none !important;
}

/*
  Premium sky plate.
*/
#scene > .hr-premium-sky-art {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    display: block !important;

    object-fit: cover !important;
    object-position: center 54% !important;

    pointer-events: none !important;
    user-select: none !important;

    z-index: 0 !important;

    opacity: 1 !important;

    filter:
        saturate(1.06)
        contrast(1.03)
        brightness(0.98) !important;
}

/*
  Premium ocean plate. Only the lower portion of the source image
  is shown so the sky image remains visible above it.
*/
#scene > .hr-premium-water-art {
    position: absolute !important;

    left: -1% !important;
    right: -1% !important;
    bottom: -2% !important;

    width: 102% !important;
    height: 54% !important;

    display: block !important;

    object-fit: cover !important;
    object-position: center 76% !important;

    pointer-events: none !important;
    user-select: none !important;

    z-index: 8 !important;

    opacity: 1 !important;

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.35) 7%,
            rgba(0, 0, 0, 0.82) 17%,
            #000 27%,
            #000 100%
        ) !important;

    mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.35) 7%,
            rgba(0, 0, 0, 0.82) 17%,
            #000 27%,
            #000 100%
        ) !important;

    filter:
        saturate(1.10)
        contrast(1.06)
        brightness(0.97) !important;
}

/*
  Hide the old procedural sky and ocean pieces.
*/
#scene > .scene-sky,
#scene > .cloud,
#scene > .sky-glow,
#scene > .distant-island,
#scene > .ocean,
#scene > .water-depth,
#scene > .wave-foam,
#scene > .splash,
#scene > .sun-haze,
#scene > .scene-depth {
    display: none !important;
}

/*
  Hide the old procedural ship because the premium ship image
  already contains the mast, rigging, lantern, ship and plank.
*/
#scene > .ship-back,
#scene > .mast,
#scene > .pirate-flag,
#scene > .ship,
#scene > .plank,
#scene > .plank-glow {
    display: none !important;
}

/*
  Restore the original absolute gameplay positioning.
*/
#scene > #pirate,
#scene > .pirate {
    position: absolute !important;
    z-index: 36 !important;
}

#scene > #kraken,
#scene > .kraken {
    position: absolute !important;
    z-index: 28 !important;
}

/*
  Premium ship is above the scenic background and water.
*/
#scene > .hr-premium-ship-art {
    position: absolute !important;
    z-index: 20 !important;
}

/*
  Keep gameplay information visible.
*/
#scene > .danger-card {
    position: absolute !important;
    z-index: 50 !important;
}

#scene > .scene-message {
    position: absolute !important;
    z-index: 52 !important;
}

#scene > .defeat-splash,
#scene > .chomp-flash {
    position: absolute !important;
    z-index: 70 !important;
}

/*
  Preserve premium pirate artwork.
*/
#scene .hr-premium-pirate-host,
#scene .hr-premium-pirate-fallback,
#scene .hr-premium-pirate-art {
    z-index: 38 !important;
}

/*
  Tablet tuning.
*/
@media (max-width: 900px) {
    #scene > .hr-premium-sky-art {
        object-position: center 52% !important;
    }

    #scene > .hr-premium-water-art {
        left: -3% !important;
        width: 106% !important;
        height: 56% !important;
        object-position: center 76% !important;
    }
}

/*
  Phone tuning.
*/
@media (max-width: 560px) {
    #scene > .hr-premium-sky-art {
        object-position: 57% 52% !important;
    }

    #scene > .hr-premium-water-art {
        left: -6% !important;
        width: 112% !important;
        height: 58% !important;
        bottom: -1% !important;
        object-position: center 77% !important;
    }
}

/* === WRONG GUESSES ALIGNMENT START === */

/*
  Keep the Wrong Guesses parchment fully inside the scene.
*/
#scene > .danger-card {
    top: 14px !important;
    right: 12px !important;
    bottom: auto !important;

    z-index: 55 !important;

    transform: none !important;
}

/*
  Slightly smaller spacing on tablets.
*/
@media (max-width: 900px) {
    #scene > .danger-card {
        top: 11px !important;
        right: 9px !important;
    }
}

/*
  Keep it visible on narrow mobile layouts.
*/
@media (max-width: 560px) {
    #scene > .danger-card {
        top: 8px !important;
        right: 7px !important;

        max-width: 36% !important;
    }
}

/* === WRONG GUESSES ALIGNMENT END === */

