* {
    box-sizing: border-box;
    font-family: 'Cormorant Garamond';
}

body {
    margin: 0;
    background: #070808;
    color: #d9c495;
}

.stage {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 16px;
    background: radial-gradient(ellipse at 50% 50%, #1a1910 0%, #080a09 48%, #030504 100%)
}

.art {
    width: min(100%, 460px)
}

.art svg {
    display: block;
    width: 100%;
    height: auto
}

.control {
    display: block;
    margin: 0 auto 24px;
    background: transparent;
    border: 1px solid #78623e;
    border-radius: 24px;
    color: inherit;
    padding: 12px 20px;
    font: inherit;
    cursor: pointer
}

.control:focus-visible {
    outline: 2px solid #edd18e;
    outline-offset: 4px
}

@media (min-width: 768px) {
    .art {
        width: 500px
    }
}

.stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0
}

.lotus-session {
    width: min(100%, 500px);
    margin: 0 auto 24px;
    text-align: center
}

.countdown-label {
    font-size: clamp(16px, 3.2vw, 21px);
    /*font-family: Arial;*/
    color: #c4b994
}

.countdown {
    margin: 8px 0 16px;
    font-family: Georgia, serif;
    font-size: clamp(36px, 7vw, 48px);
    line-height: 1.2;
    color: #f4e6b8;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 18px #eec97825
}

.lotus-row {
    display: flex;
    align-items: center;
    min-width: 0
}

.lotus-art {
    display: block;
    width: 46%;
    flex-shrink: 0;
    overflow: visible
}

.lotus-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #65502c33, #cdaa6266, #65502c33)
}

.level {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid #b8964a66;
    border-radius: 50%;
    color: #ddcb96;
    font-size: 20px;
    animation: level-breathe 6s ease-in-out infinite
}

.level-right {
    animation-delay: -3.1s;
    animation-duration: 7.3s;
    /*place-items: normal;*/
}

.lotus-petal {
    transform-origin: 120px 136px;
    animation: petal-breathe 8s ease-in-out var(--petal-phase) infinite
}

.petal-wave {
    opacity: .18;
    animation: petal-wave 11s ease-in-out var(--petal-phase) infinite
}

.session-status {
    min-height: 18px;
    font-size: 14px;
    color: #d8c28c;
    margin: 12px 0 0
}

.lotus-session.is-paused * {
    animation-play-state: paused !important
}

@keyframes level-breathe {
    0%, 100% {
        opacity: .5;
        box-shadow: 0 0 3px #d8ad4510
    }
    50% {
        opacity: .95;
        box-shadow: 0 0 12px #d8ad4530
    }
}

@keyframes petal-breathe {
    0%, 100% {
        opacity: .82;
        transform: rotate(-.3deg)
    }
    50% {
        opacity: 1;
        transform: rotate(.3deg)
    }
}

@keyframes petal-wave {
    0% {
        stroke-dashoffset: 0;
        opacity: .08
    }
    50% {
        opacity: .3
    }
    100% {
        stroke-dashoffset: -100;
        opacity: .08
    }
}

@media (prefers-reduced-motion: reduce) {
    .lotus-session * {
        animation: none !important
    }
}


.petal-fire {
    pointer-events: none
}

.fire-soft {
    opacity: .65
}

.fire-core {
    opacity: .8
}

/* Independent diagnostic switches from config.js. Keep the artwork visible. */
.art svg.no-yantra-animation .spin,
.art svg.no-yantra-animation .wave-sample,
.art svg.no-yantra-animation circle.pulse,
.art svg.no-points-animation .reverse,
.art svg.no-points-animation .orbit,
.art svg.no-points-animation g.pulse,
.art svg.no-points-animation .ornament-wave,
.lotus-session.no-lotus-animation * {
    animation: none !important;
}

.art svg.no-yantra-animation .wave-sample {
    opacity: .3;
}

/* Small screens keep the light waves, without repainting large blur surfaces. */
@media (max-width: 767px) {
    .art g[filter="url(#wave-bloom)"] {
        filter: none;
        opacity: .22;
    }

    .fire-soft {
        display: none;
    }

    .level {
        box-shadow: 0 0 8px #d8ad4520;
        animation-name: level-opacity;
    }
}

@keyframes level-opacity {
    0%, 100% { opacity: .5 }
    50% { opacity: .95 }
}

/* Full viewport shell. Animations keep their SVG coordinates and scale together. */
html, body {
    width: 100%;
    min-height: 100%;
    margin: 0
}

body {
    background: #060b08
}

.app-screen {
    width: 100%;
    max-width: 768px;
    margin-inline: auto;
    height: 100vh;
    height: 100dvh;
    min-height: 460px;
    display: grid;
    grid-template-rows:auto minmax(0, 1fr) auto;
    padding-top: env(safe-area-inset-top, 0px);
    background: radial-gradient(ellipse at 50% 49%, #27231366, transparent 60%), #080e0a
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: clamp(12px, 2.2dvh, 24px) clamp(20px, 5vw, 40px)
}

.avatar {
    flex: 0 0 auto;
    width: clamp(44px, 6.6dvh, 62px);
    height: clamp(44px, 6.6dvh, 62px);
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid #c5a05888;
    background: radial-gradient(circle at 35% 25%, #827044, #282619 63%, #10180f);
    box-shadow: inset 0 0 16px #eacb7540;
    color: #f4df9f;
    font: 28px Georgia, serif
}

.greeting p, .greeting h1 {
    margin: 0;
    line-height: 1.35;
    font-weight: 400
}

.greeting p {
    font-size: clamp(16px, 2.5vw, 20px);
    color: #ece7d9
}

.greeting h1 {
    font-size: clamp(20px, 3vw, 25px);
    color: #f2e9ce;
    font-weight: 800;
}

.stage {
    min-height: 0;
    width: 100%;
    padding: 0 clamp(16px, 4vw, 32px);
    display: grid;
    grid-template-rows:minmax(0, 1fr) auto;
    justify-items: center;
    align-items: stretch;
    gap: 0;
    background: none
}

.art {
    width: 100%;
    max-width: 540px;
    height: 100%;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center
}

.art > svg {
    width: 100%;
    height: 100%;
    display: block;
    min-height: 0;
    object-fit: contain
}

.art { position: relative; }
/* Fixed brightness boost; the existing pulse still animates only opacity. */
.art .ornament-wave,
.art > svg > g.pulse {
    filter: brightness(1.35);
}
.yantra-canvas {
    position: absolute;
    pointer-events: none;
}
.art svg.canvas-yantra .spin,
.art svg.canvas-yantra > circle.pulse,
.art svg.canvas-yantra [mask] {
    display: none;
}
.art svg.canvas-yantra .wave-sample {
    animation: none !important;
}

.lotus-session {
    width: 100%;
    max-width: 500px;
    margin: 0;
    align-self: end;
    padding: 0 4px
}

.countdown-label {
    font-size: clamp(14px, 2dvh, 19px);
    line-height: 1.25
}

.countdown {
    font-size: clamp(30px, 4.7dvh, 46px);
    line-height: 1.1;
    margin: 4px 0 2px
}

.lotus-row {
    justify-content: center;
    gap: 0
}

.lotus-art {
    width: min(43%, 21dvh);
    flex: 0 1 auto;
    max-width: 176px;
    aspect-ratio: 3/2;
    height: auto
}

.level {
    width: clamp(30px, 4.5dvh, 42px);
    height: clamp(30px, 4.5dvh, 42px);
    font-size: 20px;
    font-weight: bold;
}

.session-status {
    min-height: 0;
    margin: 0;
    font-size: 12px;
    line-height: 16px
}

.session-status:not(:empty) {
    padding-block: 3px
}

.control[hidden] {
    display: none !important
}

.bottom-nav {
    display: grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    padding: 8px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid #c7b47414;
    background: linear-gradient(180deg, #11180d88, #080e0bee)
}

.nav-item {
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: #a4aa9a;
    /*font-family: Arial, sans-serif;*/
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer
}

.nav-item svg {
    width: 23px;
    height: 23px
}

.nav-item[aria-current="page"] {
    color: #ecd79c
}

.nav-item[aria-current="page"] svg {
    filter: drop-shadow(0 0 5px #d6b55444)
}

.nav-item:focus-visible {
    outline: 2px solid #e2c981;
    outline-offset: -2px;
    border-radius: 8px
}

@media (min-width: 600px) {
    .top-bar {
        gap: 18px
    }

    .nav-item {
        font-size: 14px;
        min-height: 62px
    }

    .nav-item svg {
        width: 27px;
        height: 27px
    }

    .lotus-session {
        max-width: 480px
    }
}

@media (max-height: 620px) {
    .top-bar {
        padding-block: 9px
    }

    .avatar {
        width: 40px;
        height: 40px
    }

    .greeting h1 {
        font-size: 19px
    }

    .greeting p {
        font-size: 15px
    }

    .bottom-nav {
        padding-top: 4px;
        padding-bottom: max(4px, env(safe-area-inset-bottom))
    }

    .nav-item {
        min-height: 46px;
        gap: 3px
    }

    .countdown {
        font-size: 28px
    }

    .lotus-art {
        width: min(38%, 17dvh)
    }
}

/* Generated nature background; shared master image adapts via cover. */
.app-screen {
    background: linear-gradient(180deg, rgb(12 29 23 / 81%), rgb(3 9 7 / 54%) 55%, rgb(3 9 7)), url(assets/b1.jpg) center center / cover no-repeat;
    /* background: linear-gradient(180deg, rgba(3, 9, 7, .35), rgba(3, 9, 7, .12) 55%, rgba(3, 9, 7, .35)), url("assets/b1.jpg") center center/cover no-repeat */
}

.avatar {
    object-fit: cover;
    padding: 0;
    background: #181d12
}

/* CSS blur uses pixels; a 10% translucent tint complements a soft 10px blur. */
.bottom-nav {
    margin: 6px 12px max(10px, env(safe-area-inset-bottom));
    padding: 8px 6px;
    /* border: 1px solid rgba(235, 219, 172, .16);*/
    border: 1px solid rgb(228 178 30 / 34%);
    border-radius: 22px;
    /* background: rgba(231, 231, 209, .10); */
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    /* backdrop-filter: blur(10px) saturate(115%); */
    /* box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 8px 24px rgba(0, 0, 0, .14)*/
    box-shadow: inset 0 1px 0 rgb(228 178 30 / 71%), 0 8px 24px rgb(228 178 30 / 19%);
}

.nav-item {
    color: #d0d4c8
}

.nav-item[aria-current="page"] {
    color: #ffe6a3
}

@supports not ((backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px))) {
    .bottom-nav {
        background: rgba(20, 29, 23, .92)
    }
}

@media (max-height: 620px) {
    .bottom-nav {
        margin-top: 3px;
        margin-bottom: max(6px, env(safe-area-inset-bottom));
        padding-block: 4px;
        border-radius: 18px
    }
}

@media (min-width: 600px) {
    .bottom-nav {
        margin-inline: 24px;
        border-radius: 24px
    }
}
