
/* ================================================
   DIWALI - UMBRACO FINAL CSS
   YOUR CUSTOM SETTINGS + V14
   ================================================ */

/* HEADER - YOUR CUSTOM SETTINGS */

.right-side-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.right-side-icon li {
    margin: 0 5px;
}

.right-side-icon .home-diya-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: block;
    cursor: pointer;
    line-height: 0;
    margin-right: 6px;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}

.right-side-icon .diya-container {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    overflow: visible;
}

.right-side-icon .photo-diya {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    animation: none !important;
    transform: none !important;
}

.right-side-icon .home-diya-btn:focus-visible {
    outline: 2px solid #f5c96d;
    outline-offset: 3px;
}

.right-side-icon .photo-diya-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
    filter: none !important;
    image-rendering: auto;
}

.right-side-icon .photo-diya-flame-layer,
.right-side-icon .photo-diya-halo {
    display: none !important;
}

/* YOUR YELLOW GLOW */

.right-side-icon .home-diya-btn::before {
    content: "";
    position: absolute;
    inset: -11px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 225, 90, 0.90) 0%,
        rgba(255, 210, 65, 0.65) 28%,
        rgba(255, 190, 45, 0.35) 52%,
        rgba(255, 190, 45, 0) 75%
    );
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
    animation: headerDiyaPulse 2.5s ease-in-out infinite;
}

@keyframes headerDiyaPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

.right-side-icon .home-diya-btn:hover::before {
    animation: none;
    opacity: 1;
}

/* PAGE SCROLL */

html.diwali-overlay-open,
body.diwali-overlay-open {
    overflow: hidden !important;
}

/* SHARED BACKGROUND */

#diwaliOverlay,
#diwaliIntro.diwali-intro {
    background: radial-gradient(
        circle at center,
        #232853 0%,
        #0d1027 100%
    ) !important;
    background-color: #0d1027 !important;
    color: #fff7e5;
}

/* ================================================
   INTRO SCREEN
   ================================================ */

.diwali-intro,
.diwali-intro * {
    box-sizing: border-box;
}

.diwali-intro {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    z-index: 2147482990;
    text-align: center;
    color: #fff9e7;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 20px 16px;
    -webkit-tap-highlight-color: transparent;
}

.diwali-intro.active {
    display: flex;
}

@supports (height: 100dvh) {
    .diwali-intro {
        height: 100dvh;
    }
}

.diwali-intro-content {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(94vw, 580px);
    max-width: 100%;
    padding: 8px 6px 16px;
    gap: 0;
    margin: auto;
}

#diwaliIntro .diwali-intro-content::before,
#diwaliIntro.diwali-intro::before {
    display: none !important;
    content: none !important;
}

/* INTRO SKIP */

.diwali-intro-skip {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
    z-index: 8;
    padding: 8px 13px;
    border: 1px solid rgba(245, 201, 109, 0.56);
    border-radius: 999px;
    color: #fff5df;
    background: rgba(29, 34, 71, 0.85);
    font: 600 14px/1.2 "Trebuchet MS", Arial, sans-serif;
    cursor: pointer;
}

.diwali-intro-skip span {
    font-size: 20px;
    vertical-align: -1px;
    padding-left: 3px;
}

.diwali-intro-skip:hover {
    background: rgba(255,255,255,0.22);
}

/* INTRO TEXT */

.diwali-intro-kicker {
    color: #ffda83;
    font: 800 clamp(12px,1.9vw,14px)/1.4 "Trebuchet MS", sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.diwali-intro-title {
    font: 900 clamp(34px,5.4vw,60px)/1.06
        "Comic Sans MS",
        "Arial Rounded MT Bold",
        "Trebuchet MS",
        sans-serif;
    color: #fff6de;
    letter-spacing: -0.035em;
    text-shadow: none;
    margin: 0;
}

.diwali-intro-title span {
    display: block;
    color: #ffdc83;
    text-shadow: none;
}

.diwali-intro-instruction {
    margin: 14px 0 4px;
    font: 700 clamp(14px,2vw,18px)/1.4
        "Trebuchet MS", sans-serif;
    color: #f9e5b9;
}

/* INTRO DIYA */

.diwali-intro-diya-area {
    position: relative;
    width: clamp(225px,31vw,320px);
    height: clamp(205px,33vh,295px);
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 0;
}

.diwali-intro-diya-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(192px,24vw,250px);
    height: clamp(192px,24vw,250px);
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    isolation: isolate;
    animation: none !important;
    transform: none !important;
    filter: none !important;
}

.diwali-intro-diya-btn .photo-diya {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    animation: none !important;
    transform: none !important;
}

.diwali-intro-diya-btn .photo-diya-image,
.diwali-intro-diya-btn .photo-diya-flame-layer {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.diwali-intro-diya-btn .photo-diya-image {
    z-index: 2;
    filter: none !important;
    animation: none !important;
    transform: none !important;
}

.diwali-intro-diya-btn .photo-diya-flame-layer {
    z-index: 3;
    opacity: 0.24;
    transform-origin: 49.6% 36%;
    -webkit-mask-image: radial-gradient(
        ellipse 11.5% 25% at 49.6% 28%,
        #000 24%,
        rgba(0,0,0,.82) 44%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse 11.5% 25% at 49.6% 28%,
        #000 24%,
        rgba(0,0,0,.82) 44%,
        transparent 100%
    );
    animation: photographicFlame 1.25s ease-in-out infinite;
}

.diwali-intro-diya-btn .photo-diya-halo {
    position: absolute;
    left: 49.5%;
    top: 27%;
    width: 24%;
    height: 38%;
    z-index: 1;
    display: block;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    background: radial-gradient(
        ellipse,
        rgba(255,216,96,.30) 0%,
        rgba(255,164,30,.16) 42%,
        transparent 76%
    );
    filter: blur(11px);
    mix-blend-mode: screen;
    animation: photographicGlow 1.8s ease-in-out infinite alternate;
    pointer-events: none;
}

.diwali-intro-light {
    position: absolute;
    inset: -27px;
    z-index: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255,218,107,.26) 0%,
        rgba(255,194,67,.22) 35%,
        rgba(255,180,47,.10) 58%,
        transparent 76%
    );
    animation: kidsIntroGlow 2.8s ease-in-out infinite;
    transform: none !important;
}

@keyframes kidsIntroGlow {
    0%,100% { opacity: .46; }
    50% { opacity: 1; }
}

@keyframes photographicFlame {
    0% {
        opacity: .15;
        transform: translateX(-1.8px) rotate(-2.2deg) scaleX(.95) scaleY(1.02);
        filter: brightness(1.46) saturate(1.12) blur(.1px);
    }
    18% {
        opacity: .34;
        transform: translateX(.6px) rotate(.7deg) scaleX(1.02) scaleY(.98);
        filter: brightness(1.62) saturate(1.22);
    }
    36% {
        opacity: .26;
        transform: translateX(1.7px) rotate(2.4deg) scaleX(1.05) scaleY(.97);
        filter: brightness(1.7) saturate(1.25);
    }
    55% {
        opacity: .19;
        transform: translateX(.1px) rotate(.1deg) scaleX(.98) scaleY(1.03);
        filter: brightness(1.5) saturate(1.16);
    }
    72% {
        opacity: .31;
        transform: translateX(-1.2px) rotate(-1.7deg) scaleX(.96) scaleY(1.01);
        filter: brightness(1.62) saturate(1.2);
    }
    100% {
        opacity: .38;
        transform: translateX(1.1px) rotate(1.9deg) scaleX(1.04) scaleY(.99);
        filter: brightness(1.76) saturate(1.28);
    }
}

@keyframes photographicGlow {
    0% {
        opacity: .40;
        transform: translate(-50%,-50%) scale(.92);
    }
    100% {
        opacity: .92;
        transform: translate(-50%,-50%) scale(1.12);
    }
}

/* INTRO CLICK BUTTON */

.diwali-intro-click-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: -5px 0 13px;
    padding: 10px 26px;
    background: #ffdc80;
    border: 2px solid #f0b65d;
    border-radius: 999px;
    color: #553459;
    box-shadow: 0 4px 0 #bb7936;
    font: 900 clamp(18px,2.6vw,23px)/1.2
        "Comic Sans MS","Trebuchet MS",sans-serif;
    cursor: pointer;
}

.diwali-intro-click-text:hover {
    background: #ffedb5;
}

.diwali-intro-footer {
    color: #ffeac1;
    font: 600 clamp(12px,1.7vw,15px)/1.4
        "Trebuchet MS",sans-serif;
    opacity: .9;
    margin: 0;
}

.diwali-intro button:focus-visible {
    outline: 3px solid #ffe188;
    outline-offset: 5px;
}

/* NO EXTRA INTRO DECORATION */

#diwaliIntro .diwali-intro-pointer,
#diwaliIntro .diwali-intro-star {
    display: none !important;
}

/* ================================================
   MAIN GAME OVERLAY
   ================================================ */

#diwaliOverlay,
#diwaliOverlay * {
    box-sizing: border-box;
}

#diwaliOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2147483000;
    display: none;
    opacity: 0;
    transition: opacity .5s ease, background .5s ease;
}

#diwaliOverlay.active {
    display: block;
    opacity: 1;
}

@supports (height: 100dvh) {
    #diwaliOverlay {
        height: 100dvh;
    }
}

/* CLOSE BUTTON - YOUR SETTINGS */

#diwaliOverlay .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #da8105;
    border: none;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    z-index: 9999;
    transition: all .3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

#diwaliOverlay .close-btn:hover {
    background: #dc2626;
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

/* GAME INSTRUCTION */

#diwaliOverlay .game-info {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    color: #fef08a;
    font-size: clamp(12px,2.5vw,16px);
    font-weight: 600;
    background: rgba(23,28,62,.9);
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid rgba(245,158,11,.5);
    backdrop-filter: blur(8px);
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0 5px 20px rgba(0,0,0,.4);
    letter-spacing: .5px;
    text-align: center;
    width: 90%;
    max-width: 420px;
}

#diwaliOverlay .diya-counter {
    margin: 15px auto 5px;
    display: table;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    background: #d97706;
    padding: 8px 18px;
    border-radius: 20px;
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

/* PROGRESS BAR */

#diwaliOverlay .diwali-progress-track {
    position: absolute;
    top: 127px;
    left: 50%;
    transform: translateX(-50%);
    width: min(240px,52vw);
    height: 6px;
    border-radius: 99px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,220,136,.17);
    overflow: hidden;
    z-index: 1002;
    pointer-events: none;
}

#diwaliOverlay .diwali-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,#ffb75b,#ffe78f);
    transition: width .35s ease;
    border-radius: 99px;
}

/* ================================================
   GUIDED TAP ME CIRCLE
   ================================================ */

#diwaliOverlay .diwali-guided-target {
    position: absolute;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(68px,7vw,92px);
    height: clamp(68px,7vw,92px);
    margin: 0;
    padding: 0;
    border: 2.5px solid rgba(255,218,126,.94);
    border-radius: 50%;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow:
        0 0 0 5px rgba(255,204,98,.08),
        0 0 17px rgba(255,214,92,.36);
    transform: translate(-50%,-50%) !important;
    animation: kidsCircleGlow 1.9s ease-in-out infinite !important;
    isolation: isolate;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#diwaliOverlay .diwali-guided-target::before,
#diwaliOverlay .diwali-guided-target::after {
    display: none !important;
    content: none !important;
}

#diwaliOverlay .diwali-guided-light {
    display: none !important;
    background: none !important;
}

/* TAP ME BELOW CIRCLE */

#diwaliOverlay .diwali-guided-target .diwali-guided-tap {
    display: block;
    position: absolute;
    left: 50%;
    top: calc(100% + 17px);
    transform: translateX(-50%);
    z-index: 1;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: #ffe2a0;
    letter-spacing: .03em;
    font: 800 clamp(11px,1.2vw,15px)/1.15
        "Trebuchet MS",sans-serif;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

#diwaliOverlay .diwali-guided-target:hover {
    border-color: #fff3bf;
    box-shadow: 0 0 21px 6px rgba(255,220,125,.45);
}

#diwaliOverlay .diwali-guided-target:focus-visible {
    outline: none;
    border-color: #fff3b7;
    border-width: 3px;
}

@keyframes kidsCircleGlow {
    0%,100% {
        border-color: rgba(255,217,122,.65);
        box-shadow:
            0 0 0 5px rgba(255,204,98,.06),
            0 0 10px rgba(255,214,92,.13);
    }
    50% {
        border-color: #ffe99d;
        box-shadow:
            0 0 0 8px rgba(255,204,98,.11),
            0 0 23px rgba(255,214,92,.42);
    }
}

/* ================================================
   PLACED DIYAS
   ================================================ */

#diwaliOverlay .diya-item {
    position: absolute;
    width: clamp(65px,6.5vw,85px);
    height: clamp(65px,6.5vw,85px);
    transform: translate(-50%,-50%) scale(0);
    animation: popInDiya .4s
        cubic-bezier(.175,.885,.32,1.275) forwards;
    pointer-events: none;
    z-index: 300;
}

@keyframes popInDiya {
    to {
        transform: translate(-50%,-50%) scale(1);
    }
}

#diwaliOverlay .diya-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    transform: translate(-50%,-50%);
    background: radial-gradient(
        circle,
        rgba(255,200,50,.6) 0%,
        rgba(255,100,0,.2) 60%,
        transparent 80%
    );
    border-radius: 50%;
    animation: glowPulse 1.5s infinite alternate ease-in-out;
}

@keyframes glowPulse {
    from {
        transform: translate(-50%,-50%) scale(.9);
        opacity: .7;
    }
    to {
        transform: translate(-50%,-50%) scale(1.15);
        opacity: 1;
    }
}

/* SHARED PHOTO DIYA */

#diwaliOverlay .photo-diya {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    animation: none !important;
}

#diwaliOverlay .photo-diya-image,
#diwaliOverlay .photo-diya-flame-layer {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#diwaliOverlay .photo-diya-flame-layer {
    opacity: .22;
    transform-origin: 49.6% 36%;
    -webkit-mask-image: radial-gradient(
        ellipse 11.5% 25% at 49.6% 28%,
        #000 24%,
        rgba(0,0,0,.82) 44%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse 11.5% 25% at 49.6% 28%,
        #000 24%,
        rgba(0,0,0,.82) 44%,
        transparent 100%
    );
    animation: photographicFlame 1.05s ease-in-out infinite;
}

#diwaliOverlay .photo-diya-halo {
    position: absolute;
    left: 49.5%;
    top: 27%;
    width: 24%;
    height: 38%;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    background: radial-gradient(
        ellipse,
        rgba(255,216,96,.30) 0%,
        rgba(255,164,30,.16) 42%,
        transparent 76%
    );
    filter: blur(11px);
    mix-blend-mode: screen;
    animation: photographicGlow .95s ease-in-out infinite alternate;
}

#diwaliOverlay .diwali-rangoli-center-diya {
    z-index: 315;
}

/* ================================================
   RANGOLI
   ================================================ */

#diwaliOverlay .rangoli-perspective-wrapper {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 700px;
    perspective: 900px;
    z-index: 300;
    pointer-events: none;
}

#diwaliOverlay .rangoli-container {
    position: relative;
    width: 100%;
    transform: rotateX(68deg) scale(0);
    transform-origin: center bottom;
    opacity: 0;
    transition:
        transform 1.2s cubic-bezier(.175,.885,.32,1.275),
        opacity .9s ease;
    filter: drop-shadow(0 28px 22px rgba(0,0,0,.42));
}

#diwaliOverlay .rangoli-container.show {
    transform: rotateX(68deg) scale(1);
    opacity: 1;
}

#diwaliOverlay .rangoli-container::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 55%;
    width: 72%;
    height: 72%;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(0,0,0,.48) 0%,
        rgba(0,0,0,.22) 45%,
        transparent 72%
    );
    filter: blur(22px);
    opacity: .9;
    z-index: 0;
}

#diwaliOverlay .rangoli-real-img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 0 14px rgba(255,185,88,.28));
}

/* ================================================
   HAPPY DIWALI - SVG PETAL BADGE
   ================================================ */

#diwaliOverlay .happy-diwali-banner {
    position: absolute;
    top: 36%;
    left: 50%;
     width: clamp(300px, 42vw, 480px);
    height: auto;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: translate(-50%,-50%) scale(.62);
    opacity: 0;
    z-index: 1002;
    pointer-events: none;
    text-align: center;
    isolation: isolate;
    transition:
        transform .8s cubic-bezier(.175,.885,.32,1.275),
        opacity .8s ease;
}

#diwaliOverlay .happy-diwali-banner.show {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1);
}

#diwaliOverlay .happy-diwali-badge-svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 0;
}

#diwaliOverlay .happy-diwali-text-wrap {
    position: absolute;
    inset: 25% 14% 25%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3%;
    min-width: 0;
    text-align: center;
    pointer-events: none;
    overflow: visible;
}

#diwaliOverlay .happy-diwali-top {
    flex: 0 0 auto;
    font-family:
        "Comic Sans MS",
        "Comic Neue",
        "Trebuchet MS",
        sans-serif;
    font-weight: 900;
    font-size: clamp(27px,3.1vw,38px);
    line-height: 1.05;
    letter-spacing: -.035em;
    color: #fff5de;
    -webkit-text-stroke: 0;
    text-shadow: 0 2px 0 rgba(67,16,47,.28);
    transform: rotate(-3deg);
    transform-origin: 50% 50%;
    white-space: nowrap;
}

#diwaliOverlay .happy-diwali-wordmark {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 76%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transform: rotate(-2deg);
    transform-origin: 50% 50%;
}

/* HAPPY DIWALI TEXT ANIMATION */

#diwaliOverlay .happy-diwali-banner.show .happy-diwali-top {
    animation: kidsHappyWord 3.9s ease-in-out .25s infinite;
}

#diwaliOverlay .happy-diwali-banner.show .happy-diwali-wordmark {
    animation: kidsDiwaliWord 3.9s ease-in-out .55s infinite;
}

@keyframes kidsHappyWord {
    0%,100% {
        transform: translateY(0) rotate(-3deg) scale(1);
        opacity: 1;
    }
    12% {
        transform: translateY(-5px) rotate(-5deg) scale(1.06);
        opacity: 1;
    }
    24% {
        transform: translateY(1px) rotate(-2deg) scale(.99);
        opacity: 1;
    }
    34%,85% {
        transform: translateY(0) rotate(-3deg) scale(1);
        opacity: 1;
    }
}

@keyframes kidsDiwaliWord {
    0%,100% {
        transform: rotate(-2deg) scale(1);
        filter: brightness(1);
    }
    12% {
        transform: rotate(-.3deg) scale(1.025);
        filter: brightness(1.14);
    }
    25% {
        transform: rotate(-2.5deg) scale(.994);
        filter: brightness(1.04);
    }
    38%,85% {
        transform: rotate(-2deg) scale(1);
        filter: brightness(1);
    }
}

/* FINAL CELEBRATION */

#diwaliOverlay.diwali-celebration-complete .diwali-progress-track,
#diwaliOverlay.diwali-celebration-complete .diya-counter,
#diwaliOverlay.diwali-celebration-complete .game-info {
    display: none !important;
}

/* FIREWORKS */

#diwaliOverlay #fxCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 900;
}

/* ================================================
   MOBILE
   ================================================ */

@media (max-width: 600px) and (orientation: portrait) {

    #diwaliIntro .diwali-intro-content {
        padding: 10px 7px;
    }

    #diwaliIntro .diwali-intro-title {
        font-size: clamp(33px,9vw,44px);
    }

    #diwaliIntro .diwali-intro-diya-area {
        width: 90vw;
        height: clamp(205px,31vh,280px);
    }

    #diwaliIntro .diwali-intro-diya-btn {
        width: clamp(190px,24vh,235px);
        height: clamp(190px,24vh,235px);
    }

    #diwaliOverlay .close-btn {
        top: max(12px,env(safe-area-inset-top));
        right: max(12px,env(safe-area-inset-right));
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    #diwaliOverlay .diya-counter {
        margin-top: max(14px,env(safe-area-inset-top));
        padding: 7px 14px;
        font-size: 13px;
    }

    #diwaliOverlay .game-info {
        top: 64px;
        padding: 7px 12px;
        width: 87%;
        font-size: 12px;
    }

    #diwaliOverlay .diwali-progress-track {
        top: 112px;
        width: min(190px,48vw);
        height: 5px;
    }

    #diwaliOverlay .diwali-guided-target {
        width: 67px;
        height: 67px;
    }

    #diwaliOverlay .diwali-guided-target .diwali-guided-tap {
        font-size: 11px;
        top: calc(100% + 14px);
    }

    #diwaliOverlay .diya-item {
        width: 66px;
        height: 66px;
    }

    #diwaliOverlay .diya-glow {
        width: 105%;
        height: 105%;
    }

    #diwaliOverlay .happy-diwali-banner {
        top: 34%;
        width: min(85vw,342px);
        padding: 0;
    }

    #diwaliOverlay .happy-diwali-top {
        font-size: clamp(26px,7.6vw,32px);
    }

    #diwaliOverlay .rangoli-perspective-wrapper {
        bottom: clamp(38px,12vh,95px);
        width: min(94vw,440px);
        max-width: 440px;
    }
}

/* ================================================
   LANDSCAPE
   ================================================ */

@media (max-height: 530px) and (orientation: landscape) {

    #diwaliIntro.diwali-intro {
        padding: 10px 16px;
    }

    #diwaliIntro .diwali-intro-content {
        padding: 0 8px;
    }

    #diwaliIntro .diwali-intro-title {
        font-size: clamp(27px,7.5vh,38px);
    }

    #diwaliIntro .diwali-intro-instruction {
        font-size: 12px;
        margin: 3px;
    }

    #diwaliIntro .diwali-intro-diya-area {
        height: clamp(98px,29vh,142px);
        width: 180px;
    }

    #diwaliIntro .diwali-intro-diya-btn {
        width: clamp(106px,27vh,140px);
        height: clamp(106px,27vh,140px);
    }

    #diwaliIntro .diwali-intro-click-text {
        font-size: 17px;
        padding: 5px 17px;
        margin: 0 0 6px;
    }

    #diwaliIntro .diwali-intro-footer {
        font-size: 12px;
    }

    #diwaliOverlay .close-btn {
        top: 10px;
        right: max(12px,env(safe-area-inset-right));
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    #diwaliOverlay .game-info {
        top: 52px;
        width: min(80vw,420px);
        padding: 5px 10px;
        font-size: 11px;
    }

    #diwaliOverlay .diya-counter {
        margin-top: 7px;
        padding: 5px 13px;
        font-size: 12px;
    }

    #diwaliOverlay .diwali-progress-track {
        top: 93px;
        width: 160px;
        height: 4px;
    }

    #diwaliOverlay .diwali-guided-target {
        width: 44px;
        height: 44px;
    }

    #diwaliOverlay .diwali-guided-target .diwali-guided-tap {
        font-size: 8px;
        top: calc(100% + 10px);
    }

    #diwaliOverlay .diya-item {
        width: 42px;
        height: 42px;
    }

    #diwaliOverlay .diya-glow {
        width: 105%;
        height: 105%;
    }

    #diwaliOverlay .happy-diwali-banner {
    top: 41%;
    width: min(58vh, 260px);
    padding: 0;
    }

    #diwaliOverlay .happy-diwali-top {
        font-size: clamp(18px,5.4vh,25px);
    }

    #diwaliOverlay .rangoli-perspective-wrapper {
    bottom: 0px;
    width: min(38vw, 270px);
    max-width: 270px;
    }
}

/* VERY SMALL MOBILE */

@media (max-width: 359px) and (max-height: 650px) and (orientation: portrait) {
    #diwaliOverlay .rangoli-perspective-wrapper {
        bottom: 43px;
        width: 96vw;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .right-side-icon .home-diya-btn::before,
    .diwali-intro *,
    .diwali-intro *::before,
    .diwali-intro *::after,
    #diwaliOverlay .diwali-guided-target,
    #diwaliOverlay .photo-diya-flame-layer,
    #diwaliOverlay .photo-diya-halo,
    #diwaliOverlay .happy-diwali-banner.show .happy-diwali-top,
    #diwaliOverlay .happy-diwali-banner.show .happy-diwali-wordmark {
        animation: none !important;
    }

    .right-side-icon .home-diya-btn::before {
        opacity: .65;
    }
}


@media (min-width: 601px) and (max-width: 1180px)
       and (orientation: landscape)
       and (min-height: 531px) {

    #diwaliOverlay .happy-diwali-banner {
        top: 35%;
        width: min(42vw, 460px);
    }

    #diwaliOverlay .rangoli-perspective-wrapper {
        bottom: 12px;
        width: min(40vw, 400px);
        max-width: 400px;
    }
}
