/* === Handoff panel — shared between-activity transition prompt =====
   Companion to js/handoff.js. Singleton DOM (#handoff-panel) lives
   inside .game-stage as a sibling of .card-area, .swipe-game, etc.

   Visible state is controlled by both [hidden] (display) AND the
   .visible class (opacity + transform) — show() removes [hidden] then
   adds .visible to trigger the fade+slide animation; hide() removes
   .visible and re-adds [hidden] after the fade-out finishes. */

.handoff-panel {
    position: absolute;
    /* Sit near the bottom of the game stage so the activity above
       (card-area / swipe-game / fall-game centered at top:50%) stays
       in view. The user reads the prompt against the context of what
       they just finished, then advances. */
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 28px;
    min-width: 260px;
    max-width: 92%;

    background: var(--bg);
    border: 1px solid var(--subtle-border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);

    /* Above the activity overlays (swipe-game / fall-game = z-index 2)
       but well below the Recall intro modal (z-index 1000). */
    z-index: 30;
}

.handoff-panel.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.handoff-panel[hidden] { display: none; }

.handoff-title {
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.01em;
    color: var(--text);
}
.handoff-title[hidden] { display: none; }

.handoff-subtitle {
    font-size: 0.85rem;
    color: var(--text-faint, var(--text));
    text-align: center;
    line-height: 1.35;
    max-width: 36ch;
}
.handoff-subtitle[hidden] { display: none; }

.handoff-primary-btn {
    margin-top: 4px;
    padding: 10px 22px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}
.handoff-primary-btn:hover  { background: var(--heading); }
.handoff-primary-btn:active { transform: translateY(1px); }

/* === Tone variants ====================================================
   Tone affects the title color (and could affect the button later if we
   want stronger differentiation). Body text stays consistent so the
   reading rhythm doesn't change between handoffs. */

.handoff-panel.tone-success  .handoff-title { color: var(--green); }
.handoff-panel.tone-neutral  .handoff-title { color: var(--accent); }
.handoff-panel.tone-complete .handoff-title { color: var(--accent); }

/* Layout safety for tight viewports — keep the panel inside the
   activity column on mobile. */
@media (max-width: 480px) {
    .handoff-panel {
        bottom: 24px;
        padding: 14px 18px;
        min-width: 220px;
    }
}
