.if-denied-stage {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 24px;
    overflow: auto;
}

.if-denied-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 35%, rgba(22, 136, 216, .2), transparent 42%),
        rgba(7, 26, 45, .82);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.if-denied-dialog {
    position: relative;
    width: min(100%, 490px);
    padding: 40px;
    overflow: hidden;
    color: #172a3a;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
    animation: if-denied-enter .28s ease-out both;
}

.if-denied-dialog::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    content: "";
    background: linear-gradient(90deg, #e5484d, #f59e0b);
}

.if-denied-icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    place-items: center;
    color: #b4232c;
    background: #fff0f1;
    border: 1px solid #ffd5d8;
    border-radius: 50%;
}

.if-denied-icon span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    border: 3px solid currentColor;
    border-radius: 50%;
}

.if-denied-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #b4232c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
}

.if-denied-dialog h1 {
    margin: 0 0 14px;
    color: #071a2d;
    font-size: clamp(28px, 5vw, 38px);
    line-height: 1.12;
}

.if-denied-dialog > p {
    margin: 0;
    color: #526373;
    font-size: 16px;
    line-height: 1.65;
}

.if-denied-dialog > p strong {
    color: #172a3a;
}

.if-denied-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0 14px;
    padding: 15px 17px;
    text-align: left;
    background: #f5f8fb;
    border: 1px solid #dce6ef;
    border-radius: 13px;
}

.if-denied-details span {
    flex: 0 0 auto;
    color: #667788;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.if-denied-details strong {
    color: #172a3a;
    font-size: 14px;
    text-align: right;
}

.if-denied-dialog .if-denied-help {
    color: #71808e;
    font-size: 14px;
}

.if-denied-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 18px;
    color: #526373;
    font-size: 14px;
}

.if-denied-timer strong {
    min-width: 1ch;
    color: #071a2d;
}

.if-denied-pulse {
    width: 9px;
    height: 9px;
    background: #1688d8;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(22, 136, 216, .35);
    animation: if-denied-pulse 1.4s infinite;
}

.if-denied-dialog .if-denied-return {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    min-height: 48px;
    text-decoration: none;
}

@keyframes if-denied-enter {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes if-denied-pulse {
    70% { box-shadow: 0 0 0 8px rgba(22, 136, 216, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 136, 216, 0); }
}

@media (max-width: 560px) {
    .if-denied-stage { padding: 16px; }
    .if-denied-dialog { padding: 34px 22px 26px; border-radius: 20px; }
    .if-denied-details { align-items: flex-start; flex-direction: column; gap: 6px; }
    .if-denied-details strong { text-align: left; }
    .if-denied-dialog .if-denied-return { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .if-denied-dialog,
    .if-denied-pulse { animation: none; }
}
