html {
    overflow-x: hidden;
}

.gp-page {
    position: relative;
    margin: 0;
    min-height: 100dvh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding:
        max(4.5rem, 16vh)
        1.2rem
        max(1.85rem, env(safe-area-inset-bottom, 0px));
    background-color: #fbf9f5;
    color: #2a241d;
    font-family: Cairo, "IBM Plex Sans Arabic", sans-serif;
    overflow-x: hidden;
    box-sizing: border-box;
}

.gp-page.has-bg {
    background-color: #fbf9f5;
}

.gp-page--pass {
    justify-content: center;
    padding-top: max(3.2rem, 8vh);
    padding-bottom: max(2.2rem, 8vh);
}

.gp-page--rsvp {
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding:
        max(1rem, env(safe-area-inset-top, 0px))
        1.2rem
        max(1rem, env(safe-area-inset-bottom, 0px));
}

.gp-page--rsvp.has-bg {
    justify-content: flex-start;
    padding-top: clamp(10rem, 38svh, 44dvh);
}

.gp-page--rsvp .gp-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(100%, 21.5rem);
}

.gp-page--rsvp.has-bg .gp-wrap {
    justify-content: flex-start;
}

.gp-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;
    background-color: #fbf9f5;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.gp-bg picture,
.gp-bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gp-wrap {
    position: relative;
    z-index: 1;
    width: min(100%, 21.5rem);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gp-flash {
    margin: 0 0 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: #1f4d3a;
    font-weight: 700;
    text-align: center;
}

.gp-card {
    background: rgba(255, 252, 248, 0.78);
    backdrop-filter: blur(22px) saturate(1.25);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 32px;
    padding: 1.45rem 1.3rem 1.35rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 16px 36px rgba(48, 36, 24, 0.1);
    text-align: center;
    color: #2a241d;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.gp-card--rsvp {
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.gp-kicker {
    display: block;
    margin: 0 0 0.7rem;
    color: #8a847c;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
}

.gp-card h1 {
    margin: 0;
    font-size: 1.78rem;
    font-weight: 800;
    line-height: 1.2;
}

.gp-hosts {
    margin: 0.4rem 0 0;
    color: #3d362f;
    font-size: 1.02rem;
    font-weight: 600;
}

.gp-meta {
    margin: 1.05rem 0 0;
    padding: 0;
    text-align: right;
    display: grid;
    gap: 0.55rem;
}

.gp-meta div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.7rem;
}

.gp-meta dt,
.gp-meta dd {
    margin: 0;
    font-size: 0.94rem;
}

.gp-meta dt {
    color: #7a736b;
    font-weight: 600;
}

.gp-meta dd {
    color: #241f1a;
    font-weight: 800;
}

.gp-programs {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.gp-programs li {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    text-align: right;
    color: #3b342d;
    font-size: 0.9rem;
    font-weight: 700;
}

.gp-lead,
.gp-status {
    margin: 1.05rem 0 0;
    color: #5c564f;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.7;
}

.gp-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.7rem;
    margin-top: 1.05rem;
}

.gp-actions form {
    margin: 0;
}

.gp-actions button {
    width: 100%;
    min-height: 2.55rem;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
}

.gp-accept {
    background: #c4a06a;
    color: #fffaf3;
    box-shadow: 0 8px 16px rgba(176, 137, 86, 0.2);
}

.gp-decline {
    background: #fff;
    color: #3b342d;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(48, 36, 24, 0.04);
}

.gp-foot {
    margin: 1.15rem 0 0;
    color: #7a736b;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
}

.gp-foot::before {
    content: "";
    display: block;
    width: 5.2rem;
    height: 1px;
    margin: 0 auto 0.75rem;
    background: linear-gradient(90deg, transparent, rgba(36, 31, 26, 0.2), transparent);
}

.gp-card--pass picture {
    display: contents;
}

.gp-logo {
    width: 2.6rem;
    height: 2.6rem;
    margin: 0 auto 0.55rem;
    display: block;
    object-fit: contain;
}

.gp-card--pass {
    padding: 1.55rem 1.25rem 1.35rem;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.gp-card--pass .gp-logo {
    width: 1.85rem;
    height: 1.85rem;
    margin-bottom: 0.85rem;
}

.gp-card--pass .gp-kicker {
    margin: 0;
    color: #2a241d;
    font-size: 1.05rem;
    font-weight: 800;
}

.gp-card--pass h1 {
    margin-top: 0.2rem;
    color: #6f6860;
    font-size: 1.05rem;
    font-weight: 700;
}

.gp-qr {
    margin: 0.95rem auto 0.7rem;
    width: min(100%, 9.4rem);
    padding: 0.55rem;
    background: #fff;
    border-radius: 16px;
    box-sizing: border-box;
}

.gp-qr img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}

.gp-help {
    margin: 0.15rem 0 0;
    color: #6a645c;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.7;
}

.gp-help.is-note {
    color: #c62828;
}

.gp-count {
    margin: 0.95rem 0 0;
    padding: 0;
}

.gp-count span {
    display: block;
    color: #7a736b;
    font-size: 0.8rem;
    font-weight: 700;
}

.gp-count strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.45rem;
    font-weight: 800;
}

.gp-support {
    margin: 0.95rem 0 0;
    color: #6a645c;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.7;
}

.gp-support a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    color: #241f1a;
    font-weight: 800;
    text-decoration: none;
}

.gp-support svg,
.gp-countdown svg {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
}

.gp-checkin {
    display: none;
    margin: 0.85rem 0 0;
    justify-items: center;
}

.gp-checkin:has(form:not([hidden])),
.gp-checkin:has(.gp-status:not([hidden])) {
    display: grid;
}

.gp-checkin .gp-accept {
    min-width: 8.5rem;
    min-height: 2.35rem;
    padding: 0.55rem 1.2rem;
}

.gp-checkin .gp-status {
    margin: 0;
}

.gp-countdown {
    margin: 1.05rem 0 0;
    padding: 0.85rem 0 0;
    border: 0;
    border-top: 1px solid rgba(36, 31, 26, 0.08);
    background: transparent;
    border-radius: 0;
}

.gp-countdown p {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #7a736b;
    font-size: 0.8rem;
    font-weight: 700;
}

.gp-countdown strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.2rem;
    font-weight: 800;
}

@media (min-width: 769px) {
    .gp-page {
        padding:
            max(5rem, 18vh)
            1.5rem
            max(2.4rem, 5vh);
    }

    .gp-bg {
        width: 100vw;
        height: 100vh;
        background-size: cover;
    }

    .gp-wrap {
        width: min(100%, 21.5rem);
    }

    .gp-card {
        border-radius: 32px;
        padding: 1.5rem 1.35rem 1.4rem;
    }
}

@media (max-width: 430px) {
    .gp-page {
        padding-inline: 1.1rem;
    }

    .gp-card {
        padding: 1.3rem 1.15rem 1.2rem;
        border-radius: 30px;
    }

    .gp-card h1 {
        font-size: 1.55rem;
    }

    .gp-card--pass h1 {
        font-size: 1rem;
    }

    .gp-qr {
        width: min(100%, 9rem);
    }
}

@media (min-width: 769px) {
    .gp-page {
        padding:
            max(5.5rem, 18vh)
            1.5rem
            max(2.4rem, 5vh);
    }

    .gp-bg {
        background-size: cover;
        background-position: center;
    }

    .gp-wrap {
        width: min(100%, 22rem);
    }

    .gp-card {
        border-radius: 34px;
        padding: 1.55rem 1.4rem 1.45rem;
    }
}

html.gp-lock,
html.gp-lock body {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    scrollbar-gutter: auto;
    touch-action: pinch-zoom;
}

html.gp-lock body.gp-page {
    position: fixed;
    inset: 0;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: auto;
}

html.gp-lock .gp-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;
}

html.gp-lock .gp-wrap {
    max-height: 100%;
    overflow: visible;
    overscroll-behavior: none;
    touch-action: pinch-zoom;
}

html.gp-lock .gp-card--pass {
    overflow: visible;
    overscroll-behavior: none;
}

@media (max-width: 390px) {
    .gp-page {
        padding-inline: 0.95rem;
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }

    .gp-card {
        padding: 1.1rem 0.95rem 1.05rem;
    }

    .gp-actions {
        gap: 0.55rem;
    }

    .gp-qr {
        width: min(100%, 9.75rem);
    }
}
