.gf-modal-open {
    overflow: hidden;
}

.gf-modal {
    --gf-modal-width: min(420px, calc(100% - 20px));
    --gf-modal-shell-bg: #4f3625;
    --gf-modal-shell-border: rgba(215, 155, 66, 0.62);
    --gf-modal-head-bg: linear-gradient(100deg, #503724, #704a2f);
    --gf-modal-head-border: rgba(215, 155, 66, 0.48);
    --gf-modal-body-bg: #60412c;
    --gf-modal-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
    position: fixed;
    inset: 0;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.gf-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.gf-modal.closing {
    opacity: 0;
    pointer-events: none;
}

.gf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 16, 11, 0.58);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    opacity: 0;
    transition: opacity 0.24s ease, backdrop-filter 0.24s ease, -webkit-backdrop-filter 0.24s ease;
}

.gf-modal.open .gf-modal-backdrop {
    opacity: 1;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.gf-modal-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -47%) scale(0.96);
    width: var(--gf-modal-width);
    background: var(--gf-modal-shell-bg);
    border: 1px solid var(--gf-modal-shell-border);
    border-radius: 9px;
    box-shadow: var(--gf-modal-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gf-modal.open .gf-modal-card {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.gf-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 8px 10px 8px 14px;
    border-bottom: 1px solid var(--gf-modal-head-border);
    background: var(--gf-modal-head-bg);
}

.gf-modal-title {
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 0;
    color: #f3c24a;
    font-size: 18px;
    font-weight: 900;
    text-align: left;
    flex: 1 1 auto;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.42);
}

.gf-modal-title::before {
    content: "";
    display: block;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin: 0 11px 1px 2px;
    border: 2px solid #d79b42;
    transform: rotate(45deg);
}

.gf-modal-close {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid rgba(215, 155, 66, 0.5);
    background: rgba(215, 155, 66, 0.08);
    color: #f3c24a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gf-modal-close:hover {
    background: rgba(215, 155, 66, 0.2);
    border-color: rgba(243, 194, 74, 0.82);
}

.gf-modal-body {
    background: var(--gf-modal-body-bg);
}

@media (max-width: 700px) {
    .gf-modal-head {
        min-height: 40px;
        padding: 4px 8px;
    }

    .gf-modal-title {
        font-size: 13px;
        line-height: 1.25;
        padding: 0 6px;
    }

    .gf-modal-title::before {
        width: 7px;
        height: 7px;
        margin-right: 8px;
    }

    .gf-modal-close {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
    }
}
