.zn-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
}
.zn-overlay.hidden { display: none !important; }

.zn-card {
    width: min(420px, 100%);
    border-radius: 28px;
    padding: 28px 24px 22px;
    background: rgb(24, 24, 24);
    color: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    position: relative;
}
html[data-theme="light"] .zn-card {
    background: #f2f2f7;
    color: #111;
}

.zn-head {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 18px;
}
.zn-title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-align: center;
}
.zn-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}
.zn-close:hover { opacity: 1; }

.zn-sub {
    margin: 0 0 20px;
    text-align: center;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}
html[data-theme="light"] .zn-sub { color: rgba(0, 0, 0, 0.4); }

.zn-input {
    width: 100%;
    height: 58px;
    border-radius: 9999px;
    border: 2px solid transparent;
    background: rgb(38, 38, 38);
    color: #fff;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.18em;
    outline: none;
    margin-bottom: 18px;
}
.zn-input::placeholder {
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.22em;
}
.zn-input:focus {
    border-color: #1c9bf0;
}
html[data-theme="light"] .zn-input {
    background: #fff;
    color: #111;
}
html[data-theme="light"] .zn-input::placeholder {
    color: rgba(0, 0, 0, 0.28);
}

.zn-err {
    margin: -8px 0 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
}
.zn-err.hidden { display: none !important; }

.zn-btn-ok {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 9999px;
    background: #ffffff;
    color: #111111;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
}
.zn-btn-ok:hover { opacity: 0.92; }
.zn-btn-ok.is-disabled,
.zn-btn-ok:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
html[data-theme="light"] .zn-btn-ok {
    background: #111111;
    color: #ffffff;
}

.zn-input.is-wrong {
    color: #ef4444 !important;
    animation: znShake 0.42s ease;
}
@keyframes znShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
.zn-err { display: none !important; }
