:root {
    --capo-primary: #111;
    --capo-accent: #ff6219;
    --capo-bg: #fff;
    --capo-overlay: rgba(0, 0, 0, 0.5);
    --capo-radius: 16px;
    --capo-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    --capo-top-offset: 20vh;
    --capo-border: #e5e7eb;
    --capo-muted: #6b7280;
}

.capo-pop-overlay {
    position: fixed;
    inset: 0;
    background: var(--capo-overlay);
    display: none;
    z-index: 9999;
}
.capo-pop-overlay.is-open {
    display: block;
}
.capo-pop {
    position: fixed;
    inset: 0;
    display: grid;
    align-items: start;
    pointer-events: none;
    z-index: 10000;
    justify-items: center;
    padding-top: var(--capo-top-offset);
}
.capo-pop__card {
    pointer-events: none;
    visibility: hidden;
    background: var(--capo-bg);
    border-radius: var(--capo-radius);
    box-shadow: var(--capo-shadow);
    width: min(380px, 90vw);
    padding: 22px 20px;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: 0.2s ease;
    font-family:
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        "Helvetica Neue",
        Arial,
        "Noto Sans",
        "Apple Color Emoji",
        "Segoe UI Emoji";
}
.is-open + .capo-pop .capo-pop__card {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
}
.capo-pop__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    width: 28px;
    height: 28px;
    font-weight: 800;
    cursor: pointer;
}
.capo-pop__header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    justify-content: space-between;
    white-space: nowrap;
}
.capo-pop__badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    white-space: nowrap;
}
.capo-pop__title {
    font-size: 18px;
    font-weight: 700;
    margin: 6px 0 2px;
}
.capo-pop__text {
    font-size: 14px;
    color: #334155;
    margin: 0 0 14px;
}
.capo-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.capo-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 12px;
    font-size: 14px;
    outline: 0;
    width: 100%;
}
.capo-input:focus {
    border-color: var(--capo-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.capo-btn {
    margin-top: 5px;
    border: 0;
    border-radius: 10px;
    padding: 15px 14px;
    font-weight: 700;
    cursor: pointer;
    background: var(--capo-primary);
    color: #fff;
    white-space: nowrap;
    width: 100%;
}
.capo-muted {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: auto;
}
.capo-err {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    display: none;
    margin-bottom: 0;
}
.capo-err.is-on {
    display: block;
}
.capo-success {
    display: none;
    gap: 8px;
    align-items: flex-start;
}
.capo-success.is-on {
    display: flex;
}
.capo-success svg {
    flex: 0 0 auto;
}
.capo-pop__card {
    position: relative;
}
.capo-pop__close {
    top: -14px;
    right: -14px;
    width: 38px;
    height: 38px;
    font-size: 18px;
    display: grid;
    place-items: center;
    line-height: 1;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    border: 2px solid #fff;
    background: #111;
    color: #fff;
}
.capo-pop__close:focus {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(14, 165, 233, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.18);
}
@media (max-width: 440px) {
    .capo-pop__close {
        top: -10px;
        right: -10px;
        width: 30px;
        height: 30px;
    }
}
@media (max-width: 440px) {
    .capo-pop__title {
        font-size: 17px;
    }
    .capo-btn {
        padding: 12px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .capo-pop__card {
        transition: none;
    }
}
