/* static/css/funnel/steps.css
   ═══════════════════════════════════════════════════════════
   Funnel layout — no-scroll, no shift
   v2: tap feedback, gated CTAs, desktop scaling merged in
   ═══════════════════════════════════════════════════════════ */

/* ── Full-viewport body ─────────────────────────────────── */

.funnel-body {
    height: 100dvh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--pf-bg);
    color: var(--pf-text);
    font-family: var(--pf-font);
    -webkit-font-smoothing: antialiased;
}

/* ── Topbar ─────────────────────────────────────────────── */

.funnel-topbar {
    height: 56px;
    min-height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.funnel-back-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--pf-text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.funnel-back-btn:hover  { background: rgba(255,255,255,0.08); color: var(--pf-text); }
.funnel-back-btn:active { background: rgba(255,255,255,0.14); }

.funnel-progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.funnel-progress-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
}

.funnel-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pf-primary), var(--pf-accent));
    border-radius: 999px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-note {
    position: absolute;
    right: -4px;
    top: -10px;
    font-size: 0.7rem;
    animation: noteBounce 2s ease-in-out infinite;
}

.funnel-progress-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pf-text-dim);
    min-width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Topbar settings (lang + note system pickers) ───────── */
/* display toggled by JS: flex on first step, none after     */

.funnel-topbar-settings {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

/* Default (compact) mini-select — used after first step if ever shown */
.mini-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-sm);
    color: var(--pf-text-muted);
    font-size: 0.78rem;
    padding: 5px 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}
.mini-select:focus { border-color: var(--pf-primary); }

/* Prominent variant — shown on first step */
.mini-select--prominent {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 8px;
    color: var(--pf-text);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 7px 10px;
    cursor: pointer;
    outline: none;
    min-width: 90px;
    transition: background 0.15s, border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
    /* Subtle chevron via background image */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.45)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    padding-right: 26px;
}
.mini-select--prominent:hover {
    background-color: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.35);
}
.mini-select--prominent:focus {
    border-color: var(--pf-primary);
    background-color: rgba(108,92,231,0.12);
}
.mini-select--prominent option {
    background: #1a1035;
    color: var(--pf-text);
}

/* ── Stage ──────────────────────────────────────────────── */

.funnel-stage {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px 0;
}

/* ── Step card ──────────────────────────────────────────── */

.step-card {
    width: 100%;
    max-width: 520px;
    text-align: center;
    padding: 28px 20px 24px;
    position: relative;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    line-height: 1;
}

.step-title {
    font-family: var(--pf-font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--pf-text);
    letter-spacing: -0.02em;
}

.step-subtitle {
    color: var(--pf-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.step-body {
    color: var(--pf-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto var(--pf-space-md);
}

/* ── Primary CTA button ─────────────────────────────────── */

.btn-primary-music {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--pf-primary);
    color: #fff;
    border: none;
    border-radius: var(--pf-radius-full);
    font-family: var(--pf-font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 360px;
    margin-top: 20px;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 4px 16px rgba(108,92,231,0.35);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.btn-primary-music:hover  { background: #5a4bd6; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108,92,231,0.45); }
.btn-primary-music:active { transform: scale(0.97) !important; box-shadow: 0 2px 10px rgba(108,92,231,0.3); }
.btn-primary-music.btn-lg { padding: 18px 40px; font-size: 1.05rem; }

.btn-primary-music.btn-gated {
    opacity: 0.38;
    pointer-events: none;
    box-shadow: none;
    cursor: default;
}

.btn-ghost {
    display: block;
    margin: 12px auto 0;
    background: none;
    border: none;
    color: var(--pf-text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.15s;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}
.btn-ghost:hover  { color: var(--pf-text-muted); }
.btn-ghost:active { opacity: 0.7; }

/* ── Choice grid — list-style ────────────────────────────── */

.choice-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    margin: 20px auto 0;
    text-align: left;
}

.choice-grid.choice-grid-tiles {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.choice-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    background: var(--pf-bg-card);
    border: 2px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    color: var(--pf-text);
    font-family: var(--pf-font);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.08s;
    width: 100%;
    text-align: left;
    min-height: 58px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.choice-btn:hover {
    border-color: var(--pf-primary);
    background: rgba(108,92,231,0.08);
    transform: translateY(-1px);
}
.choice-btn:active:not(:disabled) {
    transform: scale(0.93) !important;
    opacity: 0.82;
    transition: transform 0.07s cubic-bezier(0.4,0,0.2,1) !important;
}
.choice-btn.selected {
    border-color: var(--pf-primary);
    background: rgba(108,92,231,0.15);
    box-shadow: 0 0 0 1px var(--pf-primary);
}

/* Tile variant */
.choice-grid-tiles .choice-btn {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 130px;
    flex: 1 1 calc(50% - 5px);
    max-width: 200px;
    text-align: center;
    padding: 20px 16px;
    min-height: 100px;
}

.choice-icon  { font-size: 1.8rem; flex-shrink: 0; }
.choice-label { font-weight: 600; font-size: 0.95rem; }
.choice-desc  { font-size: 0.78rem; color: var(--pf-text-dim); margin-top: 2px; }

/* ── Time commitment ─────────────────────────────────────── */

.time-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    margin: 24px auto 0;
}

.time-option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--pf-bg-card);
    border: 2px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    color: var(--pf-text);
    font-family: var(--pf-font);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.08s;
    min-height: 64px;
    text-align: left;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}
.time-option-btn:hover  { border-color: var(--pf-primary); background: rgba(108,92,231,0.08); transform: translateY(-1px); }
.time-option-btn:active { transform: scale(0.97); }
.time-option-btn.selected {
    border-color: var(--pf-accent);
    background: rgba(0,206,201,0.1);
    box-shadow: 0 0 0 1px var(--pf-accent);
}

.time-option-value { font-weight: 700; font-size: 1rem; color: var(--pf-text); }
.time-option-label { font-size: 0.82rem; color: var(--pf-text-dim); font-weight: 500; text-align: right; }

/* ── Gender tabs ─────────────────────────────────────────── */

.gender-tabs {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.choice-btn.gender-tab {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    background: rgba(255,255,255,0.04);
    min-height: 64px;
}
.choice-btn.gender-tab.selected {
    border-color: var(--pf-primary);
    background: rgba(108,92,231,0.14);
}

.gender-tab-label {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.gender-tab-visual {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gender-tab-visual-icon {
    font-size: 2rem;
    line-height: 1;
    display: block;
}

.gender-tab-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: none;
}

/* ── Multi-choice grid (instruments) ─────────────────────── */

.multi-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 440px;
    margin: 20px auto 0;
}

.multi-choice-grid .choice-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 155px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-align: left;
    position: relative;
    padding: 14px 16px;
    min-height: 56px;
}

.multi-choice-grid .choice-btn .choice-label {
    flex: 1;
    font-size: 0.88rem;
}

.multi-choice-grid .choice-btn.selected::after {
    content: '✓';
    position: absolute;
    top: 16px;
    right: 10px;
    color: var(--pf-primary-light);
    font-size: 1.5rem;
    font-weight: 700;
}

@media (max-width: 420px) {
    .multi-choice-grid .choice-btn { flex: 1 1 100%; }
}

.choice-visual {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-visual .choice-icon {
    font-size: 1.5rem;
}

.choice-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: none;
}

/* ── Instructions list ───────────────────────────────────── */

.instructions-list {
    text-align: left;
    max-width: 380px;
    margin: 20px auto;
}
.instruction-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.instruction-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pf-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.instruction-item p { color: var(--pf-text-muted); font-size: 0.95rem; padding-top: 4px; line-height: 1.5; }

/* ── Info highlight box ──────────────────────────────────── */

.info-highlight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(108,92,231,0.1);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    padding: 14px 16px;
    margin: 20px 0;
    font-size: 0.9rem;
    color: var(--pf-text-muted);
    line-height: 1.5;
    text-align: left;
}
.highlight-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ── Input styling ───────────────────────────────────────── */

.input-group-music {
    width: 100%;
    max-width: 380px;
    margin: 20px auto 0;
}
.input-music {
    width: 100%;
    padding: 15px 18px;
    background: var(--pf-bg-input);
    border: 2px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    color: var(--pf-text);
    font-family: var(--pf-font);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input-music:focus        { border-color: var(--pf-primary); box-shadow: 0 0 0 3px rgba(108,92,231,0.2); }
.input-music.input-error  { border-color: var(--pf-error); animation: shake 0.4s ease; }
.input-music::placeholder { color: var(--pf-text-dim); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-6px); }
    75%       { transform: translateX(6px); }
}

/* ── Email step ──────────────────────────────────────────── */

.step-email { padding: 28px 20px 24px; }
.step-email .step-title    { font-size: 1.2rem; }
.step-email .step-subtitle { font-size: 0.92rem; margin-bottom: 24px; }

.email-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.email-stat-card {
    background: var(--pf-bg-card);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-lg);
    padding: 14px 10px;
    text-align: center;
}
.stat-icon  { font-size: 1.8rem; margin-bottom: 4px; }
.stat-label { font-size: 0.68rem; color: var(--pf-text-dim); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; line-height: 1.3; }
.stat-value { font-size: 0.95rem; font-weight: 700; color: var(--pf-text); margin-top: 4px; }

@media (max-width: 480px) {
    .email-stats { grid-template-columns: 1fr; gap: 8px; margin-bottom: 20px; }
    .email-stat-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; }
    .stat-icon { font-size: 1.5rem; margin-bottom: 0; }
}

.step-email .input-group-music { margin: 0 0 16px; }
.email-terms  { margin: 12px 0 20px; }
.terms-text   { font-size: 0.78rem; color: var(--pf-text-dim); text-align: center; line-height: 1.5; }
.terms-text a { color: var(--pf-primary-light); text-decoration: none; }
.step-email .email-cta-btn { width: 100%; max-width: 100%; font-size: 1rem; padding: 16px; }

/* ── Score ring ──────────────────────────────────────────── */

.score-ring-wrap { position: relative; width: 140px; height: 140px; margin: 20px auto; }
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring-bg   { fill: none; stroke: var(--pf-bg-card); stroke-width: 10; }
.score-ring-fill { fill: none; stroke: var(--pf-accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.5s ease; }
.score-ring-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.score-number { font-family: var(--pf-font-display); font-size: 2.2rem; color: var(--pf-text); }
.score-unit   { font-size: 0.9rem; color: var(--pf-text-dim); align-self: flex-end; margin-bottom: 8px; }

.score-details        { display: flex; gap: 16px; justify-content: center; margin: 20px 0; }
.score-detail-item    { text-align: center; }
.detail-label         { display: block; font-size: 0.72rem; color: var(--pf-text-dim); text-transform: uppercase; letter-spacing: .5px; }
.detail-value         { display: block; font-size: 1.1rem; font-weight: 600; color: var(--pf-text); margin-top: 4px; }

/* ── Research / trust ────────────────────────────────────── */

.research-stats { display: flex; gap: 14px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.stat-card { background: var(--pf-bg-card); border: 1px solid var(--pf-border); border-radius: var(--pf-radius-lg); padding: 20px 16px; flex: 1; max-width: 180px; text-align: center; }
.stat-number { display: block; font-family: var(--pf-font-display); font-size: 1.8rem; color: var(--pf-accent); margin-bottom: 6px; }

.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0; }
.trust-badge  { display: flex; align-items: center; gap: 6px; background: rgba(108,92,231,0.08); border: 1px solid var(--pf-border); border-radius: var(--pf-radius-full); padding: 7px 14px; font-size: 0.78rem; color: var(--pf-text-muted); }
.badge-icon   { font-size: 0.95rem; }

/* ── Play button (legacy pitch step) ─────────────────────── */

.play-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: 0 auto;
    transition: transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn:active .play-btn-inner { transform: scale(0.92); }
.play-btn.playing { pointer-events: none; }
.play-btn-inner {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, #6C5CE7 0%, #00CEC9 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 28px rgba(108,92,231,0.5);
    transition: box-shadow 0.2s, transform 0.1s;
}
.play-btn:hover .play-btn-inner  { box-shadow: 0 8px 36px rgba(0,206,201,0.55); filter: brightness(1.08); }
.play-btn.playing .play-btn-inner { animation: playPulse 0.85s ease-in-out infinite alternate; }
.play-icon  { width: 32px; height: 32px; color: #fff; margin-left: 4px; }
.play-label { color: var(--pf-text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; }

@keyframes playPulse {
    from { box-shadow: 0 6px 28px rgba(108,92,231,0.5); }
    to   { box-shadow: 0 8px 44px rgba(0,206,201,0.65); }
}

.pitch-prompt  { color: var(--pf-text-muted); margin: 16px 0 12px; font-size: 0.95rem; }
.pitch-choices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 400px; margin: 0 auto; }
.pitch-choice-btn {
    padding: 12px 20px; min-width: 72px;
    background: var(--pf-bg-card); border: 2px solid var(--pf-border);
    border-radius: var(--pf-radius-md); color: var(--pf-text);
    font-family: var(--pf-font); font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.pitch-choice-btn:hover     { border-color: var(--pf-primary-light); background: var(--pf-bg-card-hover); }
.pitch-choice-btn.selected  { border-color: var(--pf-primary); }
.pitch-choice-btn.correct   { border-color: var(--pf-success); background: rgba(0,184,148,0.12); color: var(--pf-success); }
.pitch-choice-btn.incorrect { border-color: var(--pf-error);   background: rgba(225,112,85,0.12); color: var(--pf-error); }

/* ── Consent ─────────────────────────────────────────────── */

.consent-box { max-width: 360px; margin: 20px auto; text-align: left; }
.consent-label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 0.92rem; line-height: 1.5; color: var(--pf-text); }
.consent-input { display: none; }
.consent-checkmark { flex-shrink: 0; width: 24px; height: 24px; border: 2px solid var(--pf-border); border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; margin-top: 2px; }
.consent-checkmark svg { width: 14px; height: 14px; color: transparent; transition: color 0.15s; }
.consent-input:checked + .consent-checkmark { background: var(--pf-primary); border-color: var(--pf-primary); }
.consent-input:checked + .consent-checkmark svg { color: #fff; }
.consent-privacy { color: var(--pf-text-dim); font-size: 0.78rem; margin-top: 12px; text-align: center; }

/* ── Testimonial ─────────────────────────────────────────── */

.testimonial-card { background: var(--pf-bg-card); border: 1px solid var(--pf-border); border-radius: var(--pf-radius-lg); padding: 20px 18px; margin: 20px auto; max-width: 400px; text-align: left; }
.testimonial-quote  { font-style: italic; color: var(--pf-text); font-size: 0.95rem; line-height: 1.6; margin-bottom: 8px; }
.testimonial-author { color: var(--pf-text-dim); font-size: 0.78rem; }

/* ── Features list ───────────────────────────────────────── */

.features-list { text-align: left; max-width: 380px; margin: 20px auto; }
.feature-item  { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(61,46,107,0.3); font-size: 0.92rem; color: var(--pf-text); line-height: 1.4; }
.feature-item:last-child { border-bottom: none; }
.feature-check { color: var(--pf-success); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* ── Note knowledge check ────────────────────────────────── */

.choice-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 400px) { .choice-grid-2 { grid-template-columns: 1fr; } }
.choice-lg { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 20px 14px; }
.choice-lg .choice-icon  { font-size: 1.8rem; }

.symbol-set-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 500px; margin: 16px auto 0; }
@media (max-width: 480px) { .symbol-set-grid { grid-template-columns: 1fr; } }
.symbol-set-btn {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 12px; background: var(--pf-bg-card); border: 2px solid var(--pf-border);
    border-radius: 12px; cursor: pointer; color: var(--pf-text);
    transition: border-color 0.12s, background 0.12s, transform 0.08s;
    -webkit-tap-highlight-color: transparent;
}
.symbol-set-btn:hover  { border-color: var(--pf-primary); background: rgba(108,92,231,0.08); }
.symbol-set-btn:active { transform: scale(0.94); }
.symbol-set-btn.selected { border-color: var(--pf-primary); background: rgba(108,92,231,0.18); box-shadow: 0 0 0 1px var(--pf-primary); }
.symbol-preview  { font-size: 1.3rem; letter-spacing: 4px; display: flex; gap: 4px; }
.symbol-set-name { font-size: 0.82rem; font-weight: 600; color: var(--pf-text-dim); }
.color-dot       { display: inline-block; width: 16px; height: 16px; border-radius: 50%; }

.nkc-note-rows { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 420px; margin: 24px auto 0; }
.nkc-note-row {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 20px 16px; background: var(--pf-bg-card); border: 2px solid var(--pf-border);
    border-radius: var(--pf-radius-md); cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.08s;
    width: 100%; -webkit-tap-highlight-color: transparent;
}
.nkc-note-row:hover  { border-color: var(--pf-primary); background: rgba(108,92,231,0.10); transform: translateY(-2px); }
.nkc-note-row:active { transform: scale(0.96); }
.nkc-note-flag  { font-size: 1.8rem; line-height: 1; }
.nkc-note-label { font-size: 1rem; font-weight: 700; color: var(--pf-text); }
.nkc-note-sub   { font-size: 0.78rem; color: var(--pf-text-dim); }

/* ── Instructions triple ─────────────────────────────────── */

.step-instructions-triple { text-align: left; padding: 28px 20px 14px; }
.step-instructions-triple .step-title,
.step-instructions-triple .step-subtitle { text-align: center; }
.step-instructions-triple .btn-primary-music { display: block; margin-left: auto; margin-right: auto; }
.it-hero-icon { font-size: 2.8rem; margin-bottom: 14px; line-height: 1; }
.it-footnote  { font-size: 0.78rem; color: var(--pf-text-dim); text-align: center; margin-top: 12px; }

.it-meta { display: flex; background: var(--pf-bg-card); border: 1px solid var(--pf-border); border-radius: var(--pf-radius-md); margin-bottom: 16px; overflow: hidden; }
.it-meta-item { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; justify-content: center; }
.it-meta-divider { width: 1px; background: var(--pf-border); align-self: stretch; }
.it-meta-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pf-text-dim); }
.it-meta-value { font-size: 0.82rem; font-weight: 600; color: var(--pf-text); }
.it-lang-select { background: transparent; border: none; color: var(--pf-text); font-size: 0.82rem; font-weight: 600; font-family: var(--pf-font); cursor: pointer; padding: 0; outline: none; width: 100%; }
.it-lang-select option { background: var(--pf-bg-card); color: var(--pf-text); }

.it-steps { display: flex; flex-direction: column; margin-bottom: 16px; }
.it-step { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--pf-bg-card); border: 1px solid var(--pf-border); border-radius: 0; }
.it-step:not(:last-child) { border-bottom: none; }
.it-steps .it-step:first-child { border-radius: var(--pf-radius-md) var(--pf-radius-md) 0 0; }
.it-steps .it-step:last-child  { border-radius: 0 0 var(--pf-radius-md) var(--pf-radius-md); }
.it-connector { width: 1px; height: 6px; background: var(--pf-border); margin-left: 26px; }
.it-step-num { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.it-num-1 { background: rgba(108,92,231,0.18); color: var(--pf-primary-light); }
.it-num-2 { background: rgba(0,206,201,0.14);  color: var(--pf-accent); }
.it-num-3 { background: rgba(225,112,85,0.14);  color: var(--pf-error); }
.it-step-body  { flex: 1; min-width: 0; }
.it-step-title { font-size: 0.9rem; font-weight: 600; color: var(--pf-text); margin: 0 0 2px; }
.it-step-desc  { font-size: 0.78rem; color: var(--pf-text-dim); line-height: 1.45; margin: 0; }

.it-step-bullets {
    margin: 6px 0 0 0;
    padding-left: 0;
    list-style: none;
}
.it-step-bullets li {
    font-size: 0.78rem;
    color: var(--pf-text-dim);
    line-height: 1.6;
    padding: 1px 0 1px 14px;
    position: relative;
}
.it-step-bullets li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--pf-accent);
    font-weight: 700;
}

/* ── Research Credibility step ───────────────────────────── */

.rc-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.rc-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--pf-primary-light);
    background: rgba(108,92,231,0.14);
    border: 1px solid rgba(108,92,231,0.3);
    padding: 4px 12px;
    border-radius: var(--pf-radius-full);
}

.rc-subtitle {
    color: var(--pf-text-muted);
    font-size: 0.93rem;
    line-height: 1.65;
    margin: 0 auto 24px;
    max-width: 380px;
}

.rc-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 auto 20px;
    max-width: 440px;
    width: 100%;
}

.rc-stat {
    background: var(--pf-bg-card);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-lg);
    padding: 18px 14px 16px;
    text-align: center;
}

.rc-stat-num {
    display: block;
    font-family: var(--pf-font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--pf-accent);
    line-height: 1.1;
    margin-bottom: 6px;
}

.rc-stat-lbl {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pf-text-dim);
    line-height: 1.45;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rc-pillars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto 24px;
    max-width: 440px;
    width: 100%;
    text-align: left;
}

.rc-pillar {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--pf-bg-card);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-lg);
    padding: 14px 16px;
}

.rc-pillar-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--pf-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.rc-pillar-icon--brain  { background: rgba(108,92,231,0.14); }
.rc-pillar-icon--wave   { background: rgba(0,206,201,0.12); }
.rc-pillar-icon--music  { background: rgba(225,112,85,0.12); }

.rc-pillar-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--pf-text);
    margin-bottom: 4px;
}

.rc-pillar-desc {
    font-size: 0.8rem;
    color: var(--pf-text-muted);
    line-height: 1.55;
    margin-bottom: 6px;
}

.rc-pillar-cite {
    font-size: 0.68rem;
    color: var(--pf-text-dim);
    letter-spacing: 0.02em;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 6px;
    margin-top: 2px;
}

.rc-disclaimer {
    font-size: 0.72rem;
    color: var(--pf-text-dim);
    line-height: 1.55;
    margin-top: 12px;
    text-align: center;
}

.rc-disclaimer a {
    color: var(--pf-primary-light);
    text-decoration: none;
}
.rc-disclaimer a:hover { text-decoration: underline; }

@media (min-width: 640px) {
    .rc-stat-num   { font-size: 2.6rem; }
    .rc-stat-lbl   { font-size: 0.76rem; }
    .rc-pillar     { padding: 16px 18px; gap: 16px; }
    .rc-pillar-icon { width: 40px; height: 40px; font-size: 1.2rem; }
    .rc-pillar-label { font-size: 0.92rem; }
    .rc-pillar-desc  { font-size: 0.84rem; }
}

/* ── Phase segments ──────────────────────────────────────── */
/* flex:1 + min-width:0 ensures the bar fills all available  */
/* space when the settings panel is hidden (display:none)    */

.funnel-phases {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.phase-seg { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.phase-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.2);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.phase-seg.done   .phase-dot { background: var(--pf-accent); border-color: var(--pf-accent); }
.phase-seg.active .phase-dot { background: var(--pf-primary); border-color: var(--pf-primary); box-shadow: 0 0 8px rgba(108,92,231,0.6); animation: phasePulse 1.5s ease-in-out infinite; }
.phase-label { font-size: 0.58rem; color: var(--pf-text-dim); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.phase-seg.done .phase-label,
.phase-seg.active .phase-label { color: var(--pf-text-muted); }
.phase-line { flex: 1; height: 2px; background: rgba(255,255,255,0.1); margin: 0 4px; align-self: flex-start; margin-top: 6px; min-width: 20px; transition: background 0.3s; }
.phase-seg.done + .phase-line { background: var(--pf-accent); }

@keyframes phasePulse {
    0%, 100% { box-shadow: 0 0 6px rgba(108,92,231,0.5); }
    50%       { box-shadow: 0 0 14px rgba(108,92,231,0.9); }
}

@media (max-width: 768px) {
    .phase-label { display: none; }
    .phase-line  { min-width: 12px; }
}

/* ── Volume check ────────────────────────────────────────── */

.vc-skip-btn { display: block; margin: 1.5rem auto 0; background: none; border: none; color: rgba(255,255,255,0.35); font-size: 0.8rem; cursor: pointer; padding: 0.25rem 0.5rem; transition: color 0.2s; }
.vc-skip-btn:hover { color: rgba(255,255,255,0.65); }

/* ── PM module scrolling fix ─────────────────────────────── */

.funnel-stage:has(.step-pm-module) {
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 12px;
    padding-bottom: 24px;
}

.funnel-stage:has(#funnel-loader) {
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

#funnel-loader {
    width: 100%;
    max-width: 520px;
    min-height: calc(100dvh - 56px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ── Time Commitment step ────────────────────────────────── */

.step-time-commitment .step-title    { margin-bottom: 8px; }
.step-time-commitment .step-subtitle { margin-bottom: 24px; }

.tc-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.tc-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 20px;
    background: var(--pf-bg-card);
    border: 2px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    color: var(--pf-text);
    font-family: var(--pf-font);
    cursor: pointer;
    text-align: left;
    min-height: 68px;
    transition: border-color 0.12s, background 0.12s, transform 0.08s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.tc-btn:hover  { border-color: var(--pf-primary); background: rgba(108,92,231,0.08); transform: translateY(-1px); }
.tc-btn:active { transform: scale(0.97) !important; transition: transform 0.07s !important; }
.tc-btn.selected {
    border-color: var(--pf-accent);
    background: rgba(0,206,201,0.10);
    box-shadow: 0 0 0 1px var(--pf-accent);
}

.tc-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pf-text);
}
.tc-sublabel {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pf-text-dim);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: block;
}

.tc-notes {
    display: flex;
    gap: 0px;
    align-items: center;
    flex-shrink: 0;
    margin-left: 16px;
}
.tc-note      { font-size: 1.5rem; color: rgba(255,255,255,0.14); transition: color 0.12s; line-height: 1; }
.tc-note--on  { color: var(--pf-primary-light); }
.tc-btn.selected .tc-note--on { color: var(--pf-accent); }
.tc-btn:hover .tc-note--on    { color: var(--pf-primary-light); filter: brightness(1.2); }

@media (min-width: 640px) {
    .tc-btn    { padding: 20px 24px; min-height: 74px; }
    .tc-label  { font-size: 1.05rem; }
    .tc-note   { font-size: 1.35rem; }
}

/* ── Sticky CTA ──────────────────────────────────────────── */

.step-card {
    display: flex;
    flex-direction: column;
}

.step-card-body {
    flex: 1;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

.step-cta-sticky {
    position: sticky;
    bottom: 0;
    z-index: 10;

    margin-top: auto;
    margin-left: -20px;
    margin-right: -20px;

    padding-left: 20px;
    padding-right: 20px;
    padding-top: 12px;

    padding-bottom: calc(24px + env(safe-area-inset-bottom));

    text-align: center;
    background: linear-gradient(to bottom, transparent 0%, var(--pf-bg) 40%);
}


@media (min-width: 640px) {
    .step-cta-sticky {
        margin-left: -36px;
        margin-right: -36px;
        padding-left: 36px;
        padding-right: 36px;
        padding-bottom: calc(36px + env(safe-area-inset-bottom));
    }
    .step-card-body {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
}

/* ── Error toast ─────────────────────────────────────────── */

.step-error {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--pf-error); color: #fff; padding: 12px 24px;
    border-radius: var(--pf-radius-full); font-size: 0.88rem; z-index: 100;
    animation: slideUp 0.3s ease; white-space: nowrap;
}
@keyframes slideUp {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ── Compact piano on short screens ─────────────────────── */

@media (max-height: 680px) {
    .funnel-piano { height: 100px; }
    .step-ap-module, .step-rp-module, .step-pm-module { padding: 10px 12px 8px; }
}
@media (max-width: 380px) {
    .funnel-piano { height: 100px; max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   DESKTOP SCALING (≥640px)
   ══════════════════════════════════════════════════════════ */

@media (min-width: 640px) {

    .step-card {
        max-width: 580px;
        padding: 40px 36px 32px;
    }

    .step-title    { font-size: 1.75rem; }
    .step-subtitle { font-size: 1.0rem; line-height: 1.65; }
    .step-icon     { font-size: 3.5rem; }

    .btn-primary-music {
        max-width: 380px;
        padding: 18px 40px;
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .choice-btn {
        padding: 17px 20px;
        min-height: 64px;
        font-size: 0.98rem;
    }
    .choice-label { font-size: 0.98rem; }
    .choice-icon  { font-size: 2rem; }

    .multi-choice-grid { max-width: 520px; gap: 12px; }
    .multi-choice-grid .choice-btn {
        min-width: 180px;
        padding: 16px 18px;
        min-height: 60px;
    }

    .choice-visual { width: 44px; height: 44px; }
    .gender-tab-visual { width: 56px; height: 56px; }
    .gender-tab-visual-icon { font-size: 2.2rem; }

    .time-option-btn { padding: 20px 24px; min-height: 70px; font-size: 1rem; }

    .input-music { padding: 17px 20px; font-size: 1.05rem; }

    .play-btn-inner { width: 96px; height: 96px; }
    .play-icon      { width: 38px; height: 38px; }

    .mini-select--prominent {
        font-size: 0.86rem;
        padding: 8px 28px 8px 12px;
        min-width: 100px;
    }
}