/* ---------- Custom popup dialog (replaces native alert/prompt) ---------- */
.app-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(60, 30, 40, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 6000;
}
.app-dialog-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.app-dialog-card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 18px;
    padding: 1.6rem 1.4rem 1.3rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(255, 82, 123, 0.25);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.22s ease;
}
.app-dialog-backdrop.active .app-dialog-card {
    transform: translateY(0) scale(1);
}
.app-dialog-emoji {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.app-dialog-title {
    margin: 0 0 0.4rem;
    color: #ff527b;
    font-size: 1.15rem;
    font-family: 'Playfair Display', serif;
}
.app-dialog-msg {
    margin: 0 0 1.1rem;
    color: #7d606c;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-line;
}
.app-dialog-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #ffd8e4;
    border-radius: 10px;
    padding: 0 0.9rem;
    height: 48px;
    margin-bottom: 1.1rem;
    box-sizing: border-box;
    background: #fff;
}
.app-dialog-rm {
    color: #ff527b;
    font-weight: 700;
    font-size: 1.05rem;
}
.app-dialog-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
}
.app-dialog-actions {
    display: flex;
    gap: 0.7rem;
    justify-content: center;
}
.app-dialog-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.app-dialog-btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 6px 15px rgba(255, 82, 123, 0.25);
}
.app-dialog-btn-primary:hover {
    transform: translateY(-1px);
}
.app-dialog-btn-ghost {
    background: #fff;
    color: #7d606c;
    border: 1px solid #ffd8e4;
}
.app-dialog-btn-ghost:hover {
    background: #fff0f5;
}
