@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Onest:wght@300;400;500;600&display=swap');

/* =========================================================
   RESET
========================================================= */
:root {
    --font-script: 'Alex Brush', cursive;
    --font-serif: 'Alex Brush', cursive;
    --font-clean: 'Onest', sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #edf2f8;
    color: #555d54;
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    overflow-x: hidden;
}

section {
    width: 100%;
    position: relative;
}

button,
input,
textarea {
    font-family: inherit;
}


/* =========================================================
   COMMON
========================================================= */

.section-inner {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 80px 28px;
    text-align: center;
}

.section-label {
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 4px;
    color: #999d93;
}


/* =========================================================
   MAIN HEADINGS
========================================================= */

h2 {
    font-family: 'Alex Brush', cursive;
    font-style: normal;
    font-size: clamp(44px, 10vw, 56px);
    line-height: 0.9;
    font-weight: 400;
    letter-spacing: 0;
    color: #4f5950;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 680px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f6ef;
}


/* HERO VIDEO */

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}


/* =========================================================
   LANGUAGE SWITCH
========================================================= */

.language-switch {
    position: absolute;
    top: 24px;
    right: 24px;

    display: flex;
    align-items: center;
    gap: 3px;

    padding: 7px 10px;

    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border: 1px solid rgba(183, 168, 120, 0.5);
    border-radius: 20px;

    box-shadow: 0 4px 15px rgba(80, 75, 60, 0.08);

    z-index: 50;
}

.language-switch span {
    color: #b7b3a8;
    font-size: 8px;
}

.lang {
    border: none;
    background: transparent;
    padding: 2px 3px;

    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 1.2px;

    color: #8d9188;
    cursor: pointer;
}

.lang.active {
    color: #596255;
    font-weight: 500;
}


/* =========================================================
   MUSIC
========================================================= */

.music-button {
    position: absolute;
    top: 23px;
    left: 24px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(183, 168, 120, 0.5);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.82);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    color: #62695d;
    font-size: 13px;

    cursor: pointer;

    box-shadow: 0 4px 15px rgba(80, 75, 60, 0.08);

    z-index: 50;

    transition: transform 0.25s ease;
}

.music-button:active {
    transform: scale(0.94);
}


/* =========================================================
   HERO CONTENT
========================================================= */

.hero-content {
    position: relative;
    z-index: 5;

    width: 100%;
    padding: 20px 28px;

    text-align: center;

    transform: translateY(5px);
}

.hero-small {
    margin-bottom: 28px;

    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 2px;

    color: #858c82;
}
.hero h1 {
  font-family: 'Alex Brush', cursive;
  font-size: clamp(52px, 12vw, 72px);
  line-height: 1;
  font-weight: 400;
  color: #4f5950;
  letter-spacing: 0;
}

.hero h1 span {
  font-family: 'Alex Brush', cursive;
  font-size: 0.75em;
  display: inline-block;
  margin: 0 8px;
}
.hero-line {
    width: 42px;
    height: 1px;

    margin: 27px auto 18px;

    background: #b4a16d;
}

.hero-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 3px;

    color: #555d52;
}

/* =========================================================
   SCROLL
========================================================= */

.scroll-down {
    position: absolute;

    bottom: 24px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 7px;

    z-index: 10;

    font-size: 8px;
    letter-spacing: 3px;

    color: #8d9389;
}

.scroll-down span:last-child {
    font-size: 14px;
    line-height: 1;
}


/* =========================================================
   INVITATION
========================================================= */

.invitation {
    background: #f8f7f3;
    overflow: hidden;
}

.invitation .section-inner {
    min-height: 620px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 90px 28px;
}

.invitation .section-label {
    margin-bottom: 22px;
}

.invitation h2 {
    max-width: 360px;
    margin: 0 auto;
}


/* DECORATIVE LINE */

.decorative-line {
    width: 55px;
    height: 1px;

    margin: 25px auto;

    background: #b8a97c;
}


/* INVITATION TEXT */

.invitation-text {
    max-width: 560px;
    margin: 0 auto 40px;

    font-family: 'Onest', sans-serif;
    font-size: 15px;
    line-height: 2;
    font-weight: 500;
    font-style: italic;

    color: #858c82;
}


/* =========================================================
   INVITATION DATE
========================================================= */

.invitation-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    margin-top: 32px;
    white-space: nowrap;

    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    font-style: italic;

    color: #555d52;
}

.invitation-date > span,
.invitation-date small,
.invitation-date strong {
    margin: 0;
    padding: 0;

    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
    font-style: italic;

    color: #555d52;
}

.invitation-date > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.invitation-date small {
    letter-spacing: 2px;
}

.invitation-date strong {
    letter-spacing: 0;
}
/* =========================================================
   COUNTDOWN
========================================================= */

.countdown-section {
    background: #f1f0e9;
}

.countdown-section .section-inner {
    padding: 75px 22px 80px;
}

.countdown-section h2 {
    max-width: 360px;
    margin: 0 auto;
}

.countdown {
    width: 100%;
    max-width: 390px;

    margin: 44px auto 0;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.count-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.count-box strong {
    width: 68px;
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(178, 151, 91, 0.75);
    border-radius: 50%;

    font-family: 'Cormorant Garamond', serif;
    font-size: 29px;
    line-height: 1;
    font-weight: 500;

    color: #4f574c;

    background: rgba(255, 255, 255, 0.22);

    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, 0.15),
        0 4px 15px rgba(104, 91, 60, 0.04);
}

.count-box span {
    margin-top: 12px;

    font-family: 'Montserrat', sans-serif;

    font-size: 8px;
    font-weight: 500;
    letter-spacing: 2px;

    color: #777d72;
}


/* =========================================================
   LOCATION
========================================================= */

.location {
    position: relative;

    width: 100%;
    min-height: 850px;

    overflow: hidden;

    background: #f4efe5;
}

.location-bg {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    background-image: none;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    z-index: 0;
}

.location-bg::after {
    content: "";

    position: absolute;
    inset: 0;

    background: rgba(255, 255, 255, 0.48);

    z-index: 1;
}


/* LOCATION CONTENT */

.location-content {
    position: relative;
    z-index: 5;

    min-height: 850px;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 70px 20px 65px;

    text-align: center;
}

.location .section-label {
    margin-bottom: 18px;
}

.location h2 {
    max-width: 350px;
    margin: 0 auto;

    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.7);
}


/* ADDRESS */

.location-address {
    position: relative;

    display: inline-block;

    margin: 28px auto 27px;
    padding: 18px 34px;

    font-size: 11px;
    line-height: 2;

    font-weight: 500;

    color: #596154;

    z-index: 2;
}

.location-address::before {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 285px;
    height: 115px;

    transform: translate(-50%, -50%);

    background: rgba(250, 248, 241, 0.88);

    border-radius: 50%;

    box-shadow:
        0 4px 18px rgba(90, 85, 70, 0.04);

    z-index: -1;
}


/* =========================================================
   MAP
========================================================= */

.map-card {
    position: relative;

    width: 100%;
    max-width: 330px;
    height: 245px;

    margin: 0 auto 18px;

    overflow: hidden;

    background: #f8f7f3;

    border: 1px solid rgba(183, 168, 120, 0.5);
    border-radius: 20px;

    box-shadow:
        0 8px 28px rgba(80, 75, 60, 0.10);

    z-index: 3;
}

.map-card iframe {
    display: block;

    width: 100%;
    height: 100%;

    border: 0;
}


/* MAP BUTTON */

.map-button {
    width: 190px;
    min-height: 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 1px solid rgba(140, 145, 128, 0.75);

    background: rgba(255, 255, 255, 0.90);

    color: #596154;

    text-decoration: none;

    font-family: 'Montserrat', sans-serif;

    font-size: 9px;
    font-weight: 400;
    letter-spacing: 2px;

    box-shadow:
        0 5px 20px rgba(70, 70, 60, 0.08);

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.map-button span {
    font-size: 13px;
}

.map-button:active {
    transform: scale(0.97);
}


/* =========================================================
   RSVP
========================================================= */

.rsvp {
    background: #eeeee8;
}

.rsvp .section-inner {
    padding: 75px 28px 80px;
}

.rsvp .section-label {
    margin-bottom: 20px;
}

.rsvp h2 {
    max-width: 360px;
    margin: 0 auto;
}


/* RSVP DESCRIPTION */

.rsvp-text {
    max-width: 300px;

    margin: 23px auto 30px;

    font-size: 13px;
    line-height: 1.8;
    letter-spacing: 0.15px;

    color: #7d8279;
}


/* =========================================================
   RSVP FORM
========================================================= */

.rsvp-form {
    width: 100%;
    max-width: 300px;

    margin: 0 auto;
}


/* =========================================================
   INPUTS
========================================================= */

.guest-name,
.guest-wish {
    width: 100%;

    border: 1px solid rgba(157, 163, 143, 0.72);

    background: rgba(255, 255, 255, 0.42);

    color: #596154;

    font-family: 'Montserrat', sans-serif;

    font-weight: 300;

    outline: none;

    transition:
        border-color 0.25s ease,
        background 0.25s ease;
}


/* NAME INPUT */

.guest-name {
    height: 54px;

    padding: 0 18px;

    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0.3px;

    text-align: center;
}


/* WISH TEXTAREA */

.guest-wish {
    min-height: 110px;

    margin-top: 12px;

    padding: 16px 17px;

    resize: none;

    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.2px;

    text-align: left;
}


/* PLACEHOLDERS */

.guest-name::placeholder,
.guest-wish::placeholder {
    color: #a1a49b;

    font-size: 14px;
    letter-spacing: 0.2px;

    opacity: 1;
}


/* FOCUS */

.guest-name:focus,
.guest-wish:focus {
    border-color: #b5a878;

    background: rgba(255, 255, 255, 0.72);
}


/* =========================================================
   WISH BUTTON
========================================================= */

.wish-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 190px;
    height: 50px;

    margin: 16px auto 42px;

    border: 1px solid rgba(170, 154, 110, 0.7);

    background: rgba(255, 255, 255, 0.45);

    color: #596154;

    font-family: 'Montserrat', sans-serif;

    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2.3px;

    cursor: pointer;

    transition:
        background 0.25s ease,
        transform 0.2s ease;
}

.wish-button:hover {
    background: rgba(255, 255, 255, 0.8);
}

.wish-button:active {
    transform: scale(0.97);
}

.wish-button:disabled {
    opacity: 0.5;
    cursor: default;
}


/* =========================================================
   RSVP QUESTION
========================================================= */

.rsvp-question {
    margin: 24px auto 14px;

    font-size: 11px;
    font-weight: 400;

    letter-spacing: 1.8px;
    line-height: 1.6;

    color: #858b82;
}


/* =========================================================
   RSVP BUTTONS
========================================================= */

.rsvp-buttons {
    display: flex;
    flex-direction: column;

    gap: 10px;

    width: 100%;
}

.rsvp-button {
    width: 100%;
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    border: 1px solid rgba(157, 163, 143, 0.72);

    background: rgba(255, 255, 255, 0.30);

    color: #60675b;

    font-family: 'Montserrat', sans-serif;

    font-size: 12px;
    font-weight: 400;

    letter-spacing: 2px;

    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease;
}

.rsvp-icon {
    font-family: Arial, sans-serif;

    font-size: 14px;

    color: #a99d78;
}

.rsvp-button.active {
    background: rgba(255, 255, 255, 0.88);

    border-color: #b5a878;

    box-shadow:
        0 5px 20px rgba(90, 85, 65, 0.06);
}

.rsvp-button.active .rsvp-icon {
    color: #9f8d60;
}

.rsvp-button:active {
    transform: scale(0.98);
}


/* =========================================================
   RSVP MESSAGE
========================================================= */

.rsvp-message {
    min-height: 20px;

    margin-top: 15px;

    font-size: 12px;
    line-height: 1.6;

    color: #70776d;
}


/* =========================================================
   FINAL
========================================================= */

.final {
    position: relative;

    min-height: 100svh;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #f4efe5;
}

.final::before {
    content: "";

    position: absolute;
    inset: 0;

    background-image: url("assets/invitation-bg.webp");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    z-index: 0;
}

.final::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(250, 247, 239, 0.18),
            rgba(250, 247, 239, 0.30)
        );

    z-index: 1;
}

.final .section-inner {
    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 100svh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 80px 28px 90px;

    text-align: center;
}

.final-small {
    margin-bottom: 25px;

    font-size: 9px;
    font-weight: 400;
    letter-spacing: 4px;

    color: #858b81;
}

.final h2 {
    max-width: 360px;

    margin: 0 auto;

    font-size: clamp(40px, 9.5vw, 52px);
    line-height: 0.92;
}

.final h2 span {
    display: block;

    margin: 9px 0;

    font-family: 'Cormorant Garamond', serif;
    font-style: normal;

    font-size: 26px;

    color: #a99a72;
}

.final-date {
    margin-top: 30px;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 5px;

    color: #555d52;
}

.final-line {
    width: 40px;
    height: 1px;

    margin: 30px auto 20px;

    background: #b7a878;
}

.credit {
    display: block;

    max-width: 230px;

    margin: 0 auto;

    font-size: 8px;
    line-height: 1.7;
    letter-spacing: 0.5px;

    color: #858b82;

    text-decoration: none;
}


/* =========================================================
   WISH MODAL / EXTRA ELEMENTS
========================================================= */

.wishes-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;

    font-size: clamp(34px, 8vw, 44px);
    line-height: 1;

    font-weight: 500;

    color: #4f5950;
}

.wishes-subtitle {
    font-size: 11px;
}

.wish-modal-box input,
.wish-modal-box textarea {
    font-size: 14px;
}

.wish-modal-box input::placeholder,
.wish-modal-box textarea::placeholder {
    font-size: 14px;
}

.wish-suggestions button {
    font-size: 9px;
    line-height: 1.4;
}

.wish-modal-box h3 {
    font-family: 'Cormorant Garamond', serif;

    font-size: 28px;
}


/* =========================================================
   TABLET / DESKTOP
========================================================= */

@media (min-width: 700px) {

    .section-inner {
        padding: 100px 40px;
    }

    .hero h1 {
        font-size: 60px;
    }

    h2 {
        font-size: 44px;
    }

    .hero,
    .final {
        min-height: 100vh;
    }

    .location,
    .location-content {
        min-height: 850px;
    }

    .count-box strong {
        width: 72px;
        height: 72px;
    }
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .section-inner {
        padding-left: 22px;
        padding-right: 22px;
    }

    .hero h1 {
        font-size: 38px;
    }

    h2 {
        font-size: 32px;
    }

    .invitation-text {
        font-size: 11px;
    }

    .guest-name,
    .guest-wish {
        font-size: 13px;
    }

    .guest-name::placeholder,
    .guest-wish::placeholder {
        font-size: 13px;
    }

    .count-box strong {
        width: 62px;
        height: 62px;

        font-size: 27px;
    }

    .countdown {
        gap: 6px;
    }

    .count-box span {
        font-size: 7px;
        letter-spacing: 1.5px;
    }

    .final h2 {
        font-size: 38px;
    }
}
.hero h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: 'Alex Brush', cursive;
  font-size: clamp(74px, 13vw, 76px);
  line-height: 0.9;
  font-weight: 400;
  color: #4f5950;
  letter-spacing: 0;
}

.hero h1 .name {
  font-family: 'Alex Brush', cursive;
}

.hero h1 .ampersand {
  font-family: 'Alex Brush', cursive;
  font-size: 0.7em;
  line-height: 0.8;
}
/* =========================
   ONEST BODY TYPOGRAPHY
========================= */

.invitation-text,
.rsvp-text,
.location-address,
.wishes-subtitle,
.rsvp-question,
.rsvp-message,
.credit,
.invitation-date small,
.count-box span,
.hero-small,
.final-small,
.section-label {
    font-family: 'Onest', sans-serif;
    font-weight: 500;
}
/* =========================================================
   INVITATION DATE — FINAL
========================================================= */

.invitation-date {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;

    margin-top: 32px !important;
    white-space: nowrap !important;

    font-family: 'Cormorant Garamond', serif !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    font-style: italic !important;

    color: #555d52 !important;
}

.invitation-date > span,
.invitation-date small,
.invitation-date strong {
    margin: 0 !important;
    padding: 0 !important;

    font-family: 'Cormorant Garamond', serif !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
    font-style: italic !important;
    letter-spacing: 0 !important;

    color: #555d52 !important;
}

.invitation-date > div {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.invitation-date small {
    text-transform: none !important;
}

/* =========================================================
   SHABLON QO'SHIMCHALARI
========================================================= */

/* Til va musiqa tugmalari — hero bo'lmasa ham tepada turadi */
.top-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    z-index: 60;
}

.location-bg--plain {
    background: linear-gradient(to bottom, #f6f1e6, #efe8da);
}

/* Manzil ovali matn uzunligiga moslashadi */
.location-address::before {
    width: calc(100% + 30px);
    height: calc(100% + 18px);
    min-width: 285px;
    min-height: 115px;
}

.location-time {
    display: block;
    margin-top: 6px;
    letter-spacing: 1.5px;
    color: #8a8f80;
}

.credit-only {
    padding: 34px 20px 40px;
    text-align: center;
    background: #f4efe5;
}

.state-msg {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 28px;
    text-align: center;
    color: #858c82;
    font-size: 13px;
}

body.embed .hero,
body.embed .final,
body.embed .final .section-inner {
    min-height: 680px;
}

/* =========================================================
   «NAMUNA» BELGISI (to'lov qilinmagan)
========================================================= */

.wm {
    position: fixed;
    inset: 0;
    z-index: 150;
    overflow: hidden;
    pointer-events: none;
}

.wm-words {
    position: absolute;
    inset: -60%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 70px 56px;
    transform: rotate(-30deg);
}

.wm-words span {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 40px;
    letter-spacing: 0.3em;
    color: rgba(150, 120, 60, 0.16);
    white-space: nowrap;
    user-select: none;
}

.wm-bar {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    pointer-events: auto;
    background: rgba(90, 97, 84, 0.94);
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 9px 16px;
    border-radius: 18px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   KONVERT (kirish)
========================================================= */

html.env-lock,
html.env-lock body {
    overflow: hidden;
}

.env-wrap {
    --seal: #a8832f;
    --paper: #f7f2e8;
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    background: #ece6da;
    transition: opacity .8s ease, transform .8s ease;
}

body.embed .env-wrap {
    background: var(--paper);
}

.env {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.7), transparent 60%),
        var(--paper);
    box-shadow: 0 30px 70px rgba(80, 70, 50, 0.18);
    perspective: 1600px;
}

/* nozik qog'oz teksturasi */
.env::before,
.flap-face::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(45deg, rgba(160, 140, 100, 0.035) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(-45deg, rgba(160, 140, 100, 0.035) 0 1px, transparent 1px 7px);
    pointer-events: none;
}

.env-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.env-lines path {
    fill: none;
    stroke: rgba(170, 150, 100, 0.32);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.env-flap {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 54%;
    z-index: 2;
    transform-origin: top center;
    transition: transform 1s cubic-bezier(.45, .05, .25, 1) .3s;
    filter: drop-shadow(0 6px 8px rgba(110, 95, 60, 0.16));
}

.flap-face {
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    background: linear-gradient(to bottom, #fbf7ef, #f2ebdd);
}

.seal {
    position: absolute;
    left: 50%;
    top: 54%;
    z-index: 3;
    width: 104px;
    height: 104px;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform .45s ease, opacity .45s ease;
    animation: sealPulse 2.6s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
}

.seal:focus-visible {
    outline: 2px solid #b4a16d;
    outline-offset: 6px;
    border-radius: 50%;
}

.seal-wax {
    position: absolute;
    inset: 0;
    border-radius: 48% 52% 50% 50% / 53% 47% 53% 47%;
    background: var(--seal);
    background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--seal) 55%, #fff) 0%, var(--seal) 42%, color-mix(in srgb, var(--seal) 60%, #000) 100%);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--seal) 88%, #000),
        0 8px 18px rgba(0, 0, 0, 0.28),
        inset 0 -5px 9px rgba(0, 0, 0, 0.32),
        inset 0 4px 7px rgba(255, 255, 255, 0.22);
}

.seal-ring {
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.42),
        inset 0 -2px 3px rgba(255, 255, 255, 0.18),
        0 1px 1px rgba(255, 255, 255, 0.15);
}

.seal-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 4px;
    font-family: 'Alex Brush', cursive;
    font-size: 34px;
    line-height: 1;
    color: color-mix(in srgb, var(--seal) 50%, #fff);
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.42), 0 1px 1px rgba(255, 255, 255, 0.25);
}

.env-hint {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(54% + 76px);
    z-index: 3;
    margin: 0;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 17px;
    letter-spacing: 0.06em;
    color: #8f8a78;
    animation: hintFade 2.6s ease-in-out infinite;
    transition: opacity .3s ease;
}

@keyframes sealPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes hintFade {
    0%, 100% { opacity: .55; }
    50% { opacity: 1; }
}

.env-wrap.opening .seal {
    animation: none;
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
}

.env-wrap.opening .env-hint {
    animation: none;
    opacity: 0;
}

.env-wrap.opening .env-flap {
    transform: rotateX(180deg);
}

.env-wrap.gone {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .seal, .env-hint { animation: none; }
    .env-flap, .env-wrap { transition-duration: .01s; }
}
