/*
 * Capture experiment #1 — "Name & keep this counter" soft card.
 * Non-blocking bottom-anchored card, hidden until name-keep-prompt.js reveals
 * it (.nk-visible). Brand blue #2ba8ff, cream/ink editorial tone. Sits above
 * page content but below the scoreboard modals (z9900) and toasts (z10100).
 */

.nk-card {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%) translateY(12px);
    z-index: 9200;
    width: calc(100% - 2rem);
    max-width: 28rem;
    box-sizing: border-box;
    padding: 1.05rem 1.15rem 1.1rem;
    border-radius: 0.9rem;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.22);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.nk-card.nk-visible {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.nk-card__title {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.nk-card__body {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #334155;
}

.nk-card__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.nk-cta {
    flex: 1 1 auto;
    min-width: 10rem;
    cursor: pointer;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.2;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 0.7rem;
    background: #2ba8ff;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.15s ease;
}

.nk-cta:hover,
.nk-cta:focus-visible {
    background: #1f93e6;
    outline: none;
}

.nk-dismiss {
    flex: 0 0 auto;
    cursor: pointer;
    background: transparent;
    border: 0;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 0.7rem;
    border-radius: 0.6rem;
}

.nk-dismiss:hover,
.nk-dismiss:focus-visible {
    color: #334155;
    background: #f1f5f9;
    outline: none;
}

@media (max-width: 420px) {
    .nk-card {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        width: auto;
        transform: translateY(12px);
    }
    .nk-card.nk-visible {
        transform: translateY(0);
    }
    .nk-cta {
        min-width: 0;
    }
}

@media (prefers-color-scheme: dark) {
    .nk-card {
        background: #0f172a;
        color: #e2e8f0;
        border-color: #1e293b;
        box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
    }
    .nk-card__body {
        color: #cbd5e1;
    }
    .nk-dismiss {
        color: #94a3b8;
    }
    .nk-dismiss:hover,
    .nk-dismiss:focus-visible {
        color: #e2e8f0;
        background: #1e293b;
    }
}
