/*
 * DiviniGen 4.2.5 — Dream and Wish visual finalisation
 * Removes legacy page glows, refines Dream geometry and stabilises Wish transitions.
 */

/* Let the shared homepage field remain the only page background. */
.divinigen-dream-page::before,
.divinigen-dream-result-inner::before,
.divinigen-wish-wrap::before,
.divinigen-wish-wrap::after {
    content: none !important;
    display: none !important;
}

/* Match the homepage's opening rhythm without the former excess scroll runway. */
.dg-dream-v40.dg-dream-entry-v41 {
    min-height: calc(100svh - 71px);
    padding: clamp(72px, 9vw, 130px) 24px clamp(56px, 7vw, 96px);
}

.dg-dream-entry-v41 .dg-dream-entry-presence-v41 {
    margin: 0 auto clamp(30px, 5vw, 52px);
}

.dg-dream-entry-v41 .dg-dream-prism-stage-live-v42 {
    width: clamp(238px, 27vw, 360px);
    margin: clamp(-34px, -2vw, -12px) auto clamp(28px, 3vw, 44px);
    transform-origin: 50% 54%;
}

/* The triangle's visual centre sits slightly below its bounding-box centre. */
.dg-dream-entry-v41 .dg-dream-centred-core-v423 {
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%);
}

/* Reconstruct a complete, symmetrical result emblem with a calm central identity. */
.dg-dream-result-triangle-v421 {
    isolation: isolate;
    background: linear-gradient(145deg, rgba(208,218,224,.38), rgba(36,43,48,.92) 48%, rgba(8,10,12,.98));
    box-shadow: inset 0 0 0 1px rgba(224,234,239,.42), inset 0 -16px 25px rgba(0,0,0,.32);
}

.dg-dream-result-triangle-v421 > img:not(.dg-dream-result-core-v425) {
    inset: -8%;
    width: 116%;
    height: 116%;
    opacity: .88;
}

.dg-dream-result-triangle-v421 .dg-dream-result-core-v425 {
    position: absolute;
    z-index: 4;
    inset: auto;
    left: 50%;
    top: 57%;
    width: 27%;
    height: 27%;
    object-fit: contain;
    opacity: .68;
    filter: brightness(1.15) drop-shadow(0 0 7px rgba(230,242,247,.22));
    mix-blend-mode: screen;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.dg-dream-result-triangle-v421 span { z-index: 3; }

/* Place the Wish opening between the original and the over-lowered 4.2.4 position. */
.dg-wish-v42:not(.is-sending):not(.is-complete-v425) .divinigen-wish-hero {
    padding-top: clamp(16px, 2.7vw, 36px);
}

/* Keep the approved loader/result in one stable viewport composition. */
.dg-wish-v42.is-sending .divinigen-wish-hero,
.dg-wish-v42.is-complete-v425 .divinigen-wish-hero {
    max-height: 0;
    margin: 0;
    padding-top: 0;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

.dg-wish-v42.is-complete-v425 .divinigen-wish-stage {
    min-height: min(520px, calc(100svh - 150px));
    display: grid;
    align-items: center;
}

/* Avoid the browser's filtered clip-path backing square around the loader star. */
.dg-wish-v42 .dg-wish-loader-star-v423 {
    background-color: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    contain: paint;
}

.dg-wish-v42 .dg-wish-loader-stage-v421 {
    background: transparent !important;
    filter: drop-shadow(0 15px 28px rgba(0,0,0,.5));
}

.dg-wish-v42 .dg-reading-seal-particles-v39 {
    background: transparent !important;
    mix-blend-mode: screen;
}

@media (max-width: 767px) {
    .dg-dream-v40.dg-dream-entry-v41 {
        min-height: auto;
        padding: 58px 16px 56px;
    }

    .dg-dream-entry-v41 .dg-dream-prism-stage-live-v42 {
        width: min(238px, 72vw);
        margin: -22px auto 28px;
    }

    .dg-wish-v42:not(.is-sending):not(.is-complete-v425) .divinigen-wish-hero {
        padding-top: clamp(14px, 4vw, 24px);
    }

    .dg-wish-v42.is-complete-v425 .divinigen-wish-stage {
        min-height: min(460px, calc(100svh - 110px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .dg-wish-v42 .divinigen-wish-hero { transition: none; }
    .dg-dream-result-triangle-v421 { animation: none !important; }
}
