/* Reuse withdrawal modal visuals; only quest layout differs. */
div.daily-quest-missed.popLoginRequiredCont {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 16px;
    box-sizing: border-box;
    border: 0;
    color: #fff;
    background: linear-gradient(to bottom, rgba(147,51,234,.2), rgba(168,85,247,.15) 15%, rgba(14,34,69,.9) 40%);
    align-items: center !important;
    justify-content: center !important;
    overflow: visible;
    display: none !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none !important;
}
.daily-quest-missed.open {
    display: flex !important;
    align-items: center !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none !important;
}
html body #daily-quest-missed:not(.open) { display: none !important; }
html body #daily-quest-missed.open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
#daily-quest-missed .quest-restore-poper {
    box-sizing: border-box;
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    width: 620px;
    max-width: calc(100vw - 48px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    margin: auto;
    transform: none !important;
    opacity: 1;
    animation: none;
    transition: none !important;
}
.daily-quest-missed.open > .quest-restore-poper { transform: translateY(0) scale(1) !important; }
.daily-quest-missed .quest-restore-mascot {
    position: absolute;
    z-index: 2;
    left: calc(50% + 246px);
    top: 50%;
    flex: none;
    width: 238px;
    height: auto;
    max-height: 410px;
    object-fit: contain;
    object-position: center bottom;
    margin: 0;
    transform: translateY(calc(-50% - 22px));
    pointer-events: none;
}
.daily-quest-missed .quest-restore-poper > * { position: relative; z-index: 3; }
.daily-quest-missed .quest-restore-poper > .withdraw-modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    left: auto !important;
    z-index: 5 !important;
    flex: none !important;
}
.daily-quest-missed .quest-restore-content,
.daily-quest-missed .quest-restore-body { width: 100%; min-width: 0; }
.daily-quest-missed .withdraw-modal-subtitle { display: block; }
.daily-quest-missed .quest-restore-message p {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    text-align: center;
}
.daily-quest-missed .quest-restore-message .quest-restore-amount { color: #22c55e; white-space: nowrap; }
.daily-quest-missed .withdraw-modal-buttons { flex-direction: column; gap: 10px; }
.daily-quest-missed .withdraw-modal-btn { width: 100%; min-height: 48px; height: auto; white-space: nowrap; }
.daily-quest-missed .withdraw-modal-btn > span { white-space: nowrap; }
.daily-quest-missed .quest-restore-secondary { width: 100%; min-height: 48px; height: auto; white-space: nowrap; }
.daily-quest-missed .mobile-sheet-handle { display: none !important; }

/* Do not let the phone sheet adapter clip the centered dialog. */
html body #daily-quest-missed {
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) !important;
    align-items: center !important;
    justify-content: center !important;
}
html body #daily-quest-missed > .quest-restore-poper {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    border-bottom: 1px solid rgba(147, 51, 234, .3) !important;
    border-radius: 16px !important;
    overflow-x: visible !important;
}
html body #daily-quest-missed.open > .quest-restore-poper {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
}
.daily-quest-missed .quest-restore-poper > * { flex-shrink: 0; }

@media (min-width: 1200px) {
    #daily-quest-missed > .quest-restore-poper {
        width: 620px;
        max-width: calc(100vw - 48px);
        margin-left: 0;
        margin-right: 0;
        padding: 32px;
    }
    #daily-quest-missed .withdraw-modal-header {
        text-align: center;
        margin-bottom: 24px;
        padding: 0 32px;
    }
    #daily-quest-missed .withdraw-modal-title {
        text-align: center;
        font-size: 26px;
        margin: 0 0 10px;
    }
    #daily-quest-missed .withdraw-modal-subtitle {
        text-align: center;
        margin: 0;
    }
    #daily-quest-missed .quest-restore-message {
        align-items: center;
        padding: 22px 24px;
        margin-bottom: 16px;
    }
    #daily-quest-missed .quest-restore-message p {
        text-align: center;
        font-size: 18px;
    }
    #daily-quest-missed .quest-restore-warning {
        text-align: center;
        margin: 0 0 24px;
        padding: 14px 18px;
    }
    #daily-quest-missed .withdraw-modal-buttons {
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
    }
    #daily-quest-missed .withdraw-modal-btn.confirm {
        flex: 1 1 auto;
        width: auto;
    }
    #daily-quest-missed .quest-restore-secondary {
        flex: 0 0 auto;
        width: auto;
        min-width: 150px;
    }
}

@media (max-width: 1024px) {
    .daily-quest-missed .quest-restore-mascot { display: none; }
}

@media (min-width: 1025px) and (max-width: 1199px) {
    .daily-quest-missed .quest-restore-mascot { display: none; }
    #daily-quest-missed > .quest-restore-poper {
        width: min(620px, calc(100vw - 48px));
        max-width: calc(100vw - 48px);
    }
}

@media (min-width: 700px) and (max-width: 1199px) {
    #daily-quest-missed .quest-restore-warning {
        margin: 0 0 18px !important;
    }
    #daily-quest-missed .withdraw-modal-buttons {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch;
        gap: 14px !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }
    #daily-quest-missed .withdraw-modal-buttons > .withdraw-modal-btn.confirm {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }
    #daily-quest-missed .withdraw-modal-buttons > .quest-restore-secondary {
        flex: 0 0 160px;
        width: 160px;
        min-width: 0;
    }
}

@media (max-height: 620px) {
    #daily-quest-missed > .quest-restore-poper { overflow-y: auto; }
}

@media (max-width: 768px) {
    html body #daily-quest-missed.mobile-sheet-root > .quest-restore-poper.mobile-sheet-panel {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

@media (max-width: 699px) {
    #daily-quest-missed .quest-restore-warning {
        margin-bottom: 14px !important;
    }
}
