/* ===================================================================
   Onboarding Tutorial — full-screen swipeable card carousel.
   Fires once on signup (when is_new_user=true), then again only when
   the user explicitly taps "Replay onboarding" in the help library.
   =================================================================== */

#onboarding-overlay {
    position: fixed;
    inset: 0;
    background: var(--paper, #F4F1EA);
    z-index: var(--z-modal-stacked, 1100);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms var(--ease-out, cubic-bezier(0.2, 0, 0, 1));
    padding-top: var(--safe-top, 0px);
    padding-bottom: var(--safe-bottom, 0px);
}

#onboarding-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.ob-skip {
    position: absolute;
    top: calc(var(--safe-top, 0px) + 16px);
    right: 16px;
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.45);
    font-family: var(--font-ui, sans-serif);
    font-size: 0.85em;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 8px 12px;
    z-index: 2;
}
.ob-skip:hover { color: rgba(0, 0, 0, 0.7); }

.ob-track {
    flex: 1;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    /* Hide the visible scrollbar without losing the native scroll behaviour */
    scrollbar-width: none;
}
.ob-track::-webkit-scrollbar { display: none; }
.ob-track.is-dragging {
    scroll-behavior: auto;        /* live drag — no smooth lag */
    cursor: grabbing;
    user-select: none;
}

.ob-card {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 28px;
    text-align: center;
    color: var(--ink, #1a1a1a);
}

.ob-card__icon {
    font-size: 96px;
    line-height: 1;
    margin-bottom: 28px;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.1));
}

.ob-card__icon img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.ob-card__title {
    font-family: var(--font-display, sans-serif);
    font-size: 1.6em;
    margin: 0 0 14px;
    color: var(--ink);
    letter-spacing: 0.5px;
    max-width: 360px;
}

.ob-card__body {
    font-family: var(--font-ui, sans-serif);
    font-size: 1.05em;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.65);
    margin: 0 0 32px;
    max-width: 320px;
}

.ob-card__cta {
    background: var(--gold-warm, linear-gradient(135deg, #FFD93D 0%, #FF8C00 100%));
    color: var(--ink);
    border: none;
    border-radius: var(--radius-pill, 100px);
    padding: 14px 32px;
    font-family: var(--font-display, sans-serif);
    font-size: 0.95em;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 140, 0, 0.25);
    transition: transform 150ms var(--ease-out), box-shadow 150ms;
    min-width: 200px;
}
.ob-card__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(255, 140, 0, 0.35);
}
.ob-card__cta:active { transform: translateY(0); }

.ob-controls {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px calc(20px + var(--safe-bottom, 0px));
    gap: 8px;
}

.ob-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    transition: background-color 200ms, width 200ms;
    cursor: pointer;
    border: none;
    padding: 0;
}
.ob-dot.is-active {
    background: var(--accent-gold, #FFD93D);
    width: 24px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    #onboarding-overlay,
    .ob-card__cta,
    .ob-dot {
        transition: none !important;
    }
}
