/* ═══════════════════════════════════════════════════════════════
   FLASHCARD TYPES — Shared question-type styles for FlashcardEngine
   Used by all flashcard activities via the shared engine.
   ═══════════════════════════════════════════════════════════════ */

/* ── Multiple choice number display ── */
.sf-mc-number {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    color: #1e293b;
    margin: 1.5rem 0;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.02em;
}
.sf-mc-number-long {
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0;
}

/* ── Multiple choice options grid ── */
.sf-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    max-width: 400px;
    margin: 1.5rem auto 0;
}

.sf-option-btn {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.sf-option-btn:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.sf-option-btn.selected {
    border-color: var(--primary-color);
    background: #eef2ff;
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.sf-option-btn.correct-reveal {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
}

.sf-option-btn.wrong-reveal {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.sf-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

/* ── Precision A vs B layout ── */
.sf-precision-prompt {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

.sf-precision-choices {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
    margin: 1.5rem 0;
}

.sf-precision-btn {
    flex: 1;
    max-width: 220px;
    padding: 1.25rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.sf-precision-btn:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.sf-precision-btn.selected {
    border-color: var(--primary-color);
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.sf-precision-btn.correct-reveal {
    border-color: #28a745;
    background: #d4edda;
}

.sf-precision-btn.wrong-reveal {
    border-color: #dc3545;
    background: #f8d7da;
}

.sf-precision-btn:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.sf-precision-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sf-precision-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

/* ── Digit display row (light mode) ── */
.sf-fc-digit-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.sf-fc-digit-box {
    width: 48px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: 10px;
    background: #f0f4ff;
    border: 2px solid #d0d8f0;
    color: #333;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.sf-fc-decimal {
    width: 20px;
    border: none;
    background: transparent;
    font-size: 2rem;
    font-weight: 700;
    color: #555;
}

.sf-fc-comma {
    width: 14px;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    font-weight: 700;
    color: #999;
}

/* ── Tap-the-digits (toggle selection) ── */
.sf-digit-tap-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.sf-digit-tap-btn {
    width: 48px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: 10px;
    background: #f0f4ff;
    border: 2px solid #d0d8f0;
    color: #333;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.sf-digit-tap-btn:hover {
    border-color: var(--primary-color);
    background: #e8edff;
}

.sf-digit-tap-btn.selected {
    background: #eef2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.sf-digit-tap-btn.correct-digit {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.sf-digit-tap-btn.wrong-digit {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.sf-digit-tap-btn.missed-digit {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.sf-digit-tap-btn:disabled {
    cursor: not-allowed;
}

.sf-digit-tap-btn.sf-fc-decimal,
.sf-digit-tap-btn.sf-fc-comma {
    cursor: default;
    pointer-events: none;
}

/* Tap instruction text */
.sf-tap-instruction {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* ── Text input (plain / roundTo) ── */
.sf-text-input {
    width: 100%;
    max-width: 200px;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    color: #333;
}

.sf-text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.sf-text-input.error {
    border-color: #dc3545;
}

.sf-text-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Input row + Check button ── */
.sf-input-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.sf-check-btn {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.sf-check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sf-check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Context card (real-world scenarios) ── */
.sf-context-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border: 1px solid #d0d8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #334155;
    text-align: center;
}

.sf-context-card strong {
    font-size: 1.3rem;
    color: #1e293b;
    font-family: 'Poppins', sans-serif;
}

/* ── MathLive input (shared) ── */
.fc-math-input {
    flex: 1;
    max-width: 340px;
    font-size: 1.3rem;
}

.fc-math-input::part(menu-toggle) {
    display: none !important;
}

/* ── Keyboard hint ── */
.fc-key-hint {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 1.5rem;
    text-align: center;
}

.fc-key-hint kbd {
    display: inline-block;
    padding: 0.1em 0.45em;
    font-size: 0.85em;
    font-family: inherit;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 1px 0 #cbd5e1;
}

/* ── Image card layout (edge-to-edge) ── */
.flashcard-card.fc-has-image {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

.flashcard-card.fc-has-image .flashcard-prompt,
.flashcard-card.fc-has-image .fc-detail,
.flashcard-card.fc-has-image .sf-options-grid,
.flashcard-card.fc-has-image .sf-input-row,
.flashcard-card.fc-has-image .flashcard-attempts,
.flashcard-card.fc-has-image .flashcard-feedback {
    padding-left: 2rem;
    padding-right: 2rem;
}

.fc-image-wrap {
    position: relative;
    width: 100%;
    max-height: 220px;
    overflow: hidden;
}

.fc-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.fc-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.6));
    pointer-events: none;
}

.fc-image-contain .fc-image,
.fc-image-contain .fc-group-image {
    object-fit: contain;
    background: #fff;
}

.fc-image-contain::after {
    display: none;
}

.fc-image-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    max-height: 220px;
}

.fc-image-svg svg {
    width: 100%;
    height: auto;
    max-height: 220px;
    display: block;
}

.fc-image-svg::after {
    display: none;
}

.fc-has-image .flashcard-prompt {
    margin-top: 1rem;
    font-size: 1.2rem;
    line-height: 1.5;
}

/* ── Select-all grid ── */
.fc-select-instruction {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin: 0.75rem 0 0;
}

.fc-select-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 1.5rem 0;
}

.fc-select-btn {
    min-width: 72px;
    height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 10px;
    background: #f0f4ff;
    border: 2px solid #d0d8f0;
    color: #333;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.fc-select-btn:hover {
    border-color: #667eea;
    background: #e8edff;
}

.fc-select-btn.selected {
    background: #eef2ff;
    border-color: #667eea;
    color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.fc-select-btn.correct-num {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.fc-select-btn.wrong-num {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.fc-select-btn.missed-num {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.fc-select-btn:disabled {
    cursor: not-allowed;
}

/* ── Ordering type ── */
.fc-order-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 52px;
    padding: 0.5rem 0;
}

.fc-order-item {
    min-width: 72px;
    height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 10px;
    background: #f0f4ff;
    border: 2px solid #667eea;
    color: #333;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.fc-order-item:hover {
    background: #e8edff;
    transform: translateY(-1px);
}

.fc-order-item.placed {
    opacity: 0.25;
    pointer-events: none;
    border-color: #d0d8f0;
    transform: scale(0.9);
}

.fc-order-label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.04em;
    margin: 0.8rem 0 0.5rem;
}

.fc-order-slots {
    display: flex;
    gap: 8px;
    justify-content: center;
    min-height: 52px;
}

.fc-order-slot {
    min-width: 72px;
    height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px dashed #d0d8f0;
    background: #fafbff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fc-slot-num {
    font-size: 1rem;
    font-weight: 600;
    color: #cbd5e1;
}

.fc-order-slot.filled {
    border-style: solid;
    border-color: #667eea;
    background: #eef2ff;
    cursor: pointer;
}

.fc-order-slot.filled:hover {
    background: #e0e7ff;
}

.fc-slot-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

/* Ordering reveal states */
.fc-order-slot.correct-pos {
    border-color: #28a745;
    background: #d4edda;
}

.fc-order-slot.correct-pos .fc-slot-text {
    color: #155724;
}

.fc-order-slot.wrong-pos {
    border-color: #dc3545;
    background: #f8d7da;
}

.fc-order-slot.wrong-pos .fc-slot-text {
    color: #721c24;
}

.fc-correct-order {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #28a745;
    margin-top: 0.6rem;
    padding: 0.4rem 0.8rem;
    background: #d4edda;
    border-radius: 6px;
}

/* ── Number input (narrow, for plain numeric answers) ── */
.fc-number-input {
    flex: 1;
    max-width: 120px;
    font-size: 1.3rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease;
}

.fc-number-input:focus {
    border-color: #667eea;
}

.fc-number-input.error {
    border-color: #ef4444;
    animation: fcShake 0.3s ease;
}

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

/* ── Data table (recipes, fares, comparisons) ── */
.fc-detail {
    margin: 0.6rem 0 1rem;
    font-size: 0.95rem;
    color: #475569;
}

.fc-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin: 0.8rem 0;
    font-size: 0.95rem;
}

.fc-data-table th {
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #334155;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fc-data-table td {
    padding: 0.5rem 1rem;
    border-top: 1px solid #e2e8f0;
    color: #1e293b;
}

.fc-data-table tr:last-child td {
    border-bottom: none;
}

.fc-data-table .fc-highlight {
    font-weight: 700;
    color: #667eea;
}

/* ═══════════════════════════════
   STACKED FRACTIONS (dp-frac)
   ═══════════════════════════════ */

.dp-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    margin: 0 0.12em;
    line-height: 1;
    text-align: center;
}

.dp-frac-num {
    border-bottom: 2px solid currentColor;
    padding: 0 0.2em 0.08em;
    opacity: 0.85;
}

.dp-frac-den {
    padding: 0.08em 0.2em 0;
}

.dp-frac-mixed {
    display: inline-flex;
    align-items: center;
    gap: 0.08em;
}

/* Fractions inside option buttons (slightly smaller) */
.sf-option-btn .dp-frac {
    margin: 0 0.08em;
    font-size: 0.88em;
}

/* ═══════════════════════════════
   GROUP CARD (multi-part questions)
   ═══════════════════════════════ */

/* ── Group card layout ── */
.flashcard-card.fc-group-card {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

/* ── Persistent zone (image + description + part label) ── */
.fc-group-image-wrap {
    position: relative;
    width: 100%;
    max-height: 200px;
    overflow: hidden;
}

.fc-group-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.fc-group-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.6));
    pointer-events: none;
}

.fc-group-description {
    padding: 0.75rem 2.5rem 0;
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
    color: #475569;
    font-style: italic;
}

.fc-part-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #667eea;
    padding: 0.5rem 2.5rem 0;
    transition: color 0.3s ease;
}

/* ── Question area (swappable zone) ── */
.fc-question-area {
    padding: 0 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.fc-group-card .flashcard-prompt {
    margin-top: 0.5rem;
    font-size: 1.15rem;
    line-height: 1.5;
}

/* ── Slide animations for group part transitions ── */
@keyframes fcSlideOutLeft {
    0%   { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-80px); }
}

@keyframes fcSlideInRight {
    0%   { opacity: 0; transform: translateX(80px); }
    100% { opacity: 1; transform: translateX(0); }
}

.fc-question-area.fc-slide-out-left {
    animation: fcSlideOutLeft 0.25s ease-in forwards;
}

.fc-question-area.fc-slide-in-right {
    animation: fcSlideInRight 0.25s ease-out forwards;
}

/* ── Part label highlight pulse ── */
@keyframes fcPartHighlight {
    0%   { color: #667eea; }
    30%  { color: #28a745; }
    100% { color: #667eea; }
}

.fc-part-label.fc-part-highlight {
    animation: fcPartHighlight 0.6s ease-out;
}

/* ── Progress dot group cluster ── */
.fc-dot-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 10px;
    padding: 2px 5px;
}

/* ── Part review ── */
.fc-part-review {
    text-align: center;
    padding-top: 0.5rem;
}

.fc-review-answer {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin: 0.75rem 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.fc-review-answer.correct {
    background: #d4edda;
    color: #155724;
}

.fc-review-answer.wrong {
    background: #f8d7da;
    color: #721c24;
}

.fc-review-explanation {
    background: #e8f4fd;
    color: #1e3a5f;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.fc-continue-btn {
    margin-top: 0.5rem;
}

/* ── Inline unit label inside MathLive input ── */
.fc-input-with-unit {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 1;
    max-width: 240px;
}

.fc-input-with-unit .fc-math-input {
    max-width: none;
    width: 100%;
}

.fc-math-has-unit {
    padding-right: 2.5rem !important;
}

.fc-inline-unit {
    position: absolute;
    right: 10px;
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 600;
    pointer-events: none;
}

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */
@media (max-width: 500px) {
    .sf-fc-digit-box,
    .sf-digit-tap-btn {
        width: 40px;
        height: 48px;
        font-size: 1.3rem;
    }

    .sf-fc-decimal,
    .sf-digit-tap-btn.sf-fc-decimal {
        width: 16px;
        font-size: 1.6rem;
    }

    .sf-fc-comma,
    .sf-digit-tap-btn.sf-fc-comma {
        width: 10px;
        font-size: 1.3rem;
    }

    .sf-options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .sf-option-btn {
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
    }

    .sf-precision-choices {
        flex-direction: column;
        align-items: center;
    }

    .sf-precision-btn {
        max-width: 100%;
        width: 100%;
    }

    .sf-precision-value {
        font-size: 1.2rem;
    }

    .sf-text-input {
        max-width: 160px;
        font-size: 1.1rem;
    }

    .sf-context-card {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .sf-context-card strong {
        font-size: 1.1rem;
    }

    .fc-math-input {
        max-width: 200px;
        font-size: 1.1rem;
    }

    .fc-image-wrap {
        max-height: 160px;
    }

    .fc-image {
        height: 160px;
    }

    .flashcard-card.fc-has-image .flashcard-prompt,
    .flashcard-card.fc-has-image .fc-detail,
    .flashcard-card.fc-has-image .sf-options-grid,
    .flashcard-card.fc-has-image .sf-input-row,
    .flashcard-card.fc-has-image .flashcard-attempts,
    .flashcard-card.fc-has-image .flashcard-feedback {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .fc-has-image .flashcard-prompt {
        font-size: 1.05rem;
    }

    .fc-select-btn,
    .fc-order-item,
    .fc-order-slot {
        min-width: 60px;
        height: 42px;
        font-size: 1rem;
        padding: 0 10px;
    }

    .fc-slot-text {
        font-size: 1rem;
    }

    .fc-order-pool,
    .fc-order-slots {
        gap: 6px;
    }

    .fc-data-table th,
    .fc-data-table td {
        padding: 0.4rem 0.6rem;
        font-size: 0.88rem;
    }

    .fc-group-image-wrap {
        max-height: 150px;
    }

    .fc-group-image {
        height: 150px;
    }

    .fc-group-description {
        padding: 0.5rem 1rem 0;
        font-size: 0.9rem;
    }

    .fc-question-area {
        padding: 0 1rem 1.5rem;
    }

    .fc-part-label {
        padding: 0.4rem 1rem 0;
    }

    .fc-input-with-unit {
        max-width: 180px;
    }
}

@media (min-width: 768px) {
    .fc-image-wrap {
        max-height: 260px;
    }

    .fc-image {
        height: 260px;
    }

    .fc-group-image-wrap {
        max-height: 240px;
    }

    .fc-group-image {
        height: 240px;
    }
}

/* ════════════════════════════════════════════════════════════════════
   NUMBER LINE PLUGIN (fc-nl-*)
   ════════════════════════════════════════════════════════════════════ */

.fc-nl-wrap {
    margin: 1.2rem auto 0.5rem;
    width: 100%;
    max-width: 520px;
    padding: 0 1rem;
}

.fc-nl-hint {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 1.2rem;
    font-style: italic;
}

.fc-nl-track {
    position: relative;
    height: 90px;
    cursor: pointer;
    padding: 30px 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    outline: none;
}

.fc-nl-track:focus-visible {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
    border-radius: 8px;
}

.fc-nl-track.disabled {
    cursor: default;
}

.fc-nl-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    background: linear-gradient(90deg, #c084fc, #a855f7, #9333ea);
    border-radius: 2px;
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.25);
}

.fc-nl-tick {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
}

.fc-nl-tick-mark {
    width: 3px;
    height: 18px;
    background: #9333ea;
    margin: 0 auto;
    border-radius: 2px;
}

.fc-nl-tick-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #475569;
    margin-top: 8px;
}

/* User marker — above the line, pin pointing down */
.fc-nl-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    pointer-events: none;
    z-index: 3;
    transition: left 0.08s ease-out;
}

.fc-nl-marker.placed {
    animation: fc-nl-pop 0.25s ease-out;
}

@keyframes fc-nl-pop {
    0% { transform: translate(-50%, -100%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}

.fc-nl-marker-pin {
    width: 18px;
    height: 18px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: rotate(-45deg);
    margin: 0 auto;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.45);
    border: 2px solid #fff;
}

.fc-nl-marker-stem {
    width: 2px;
    height: 14px;
    background: #f59e0b;
    margin: 0 auto -2px;
}

.fc-nl-marker.correct .fc-nl-marker-pin {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.5);
}
.fc-nl-marker.correct .fc-nl-marker-stem {
    background: #22c55e;
}

.fc-nl-marker.wrong .fc-nl-marker-pin {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.5);
}
.fc-nl-marker.wrong .fc-nl-marker-stem {
    background: #ef4444;
}

/* Correct answer marker — below the line (revealed after submit) */
.fc-nl-correct-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, 0);
    pointer-events: none;
    z-index: 2;
    animation: fc-nl-correct-fade 0.4s ease-out;
}

@keyframes fc-nl-correct-fade {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.fc-nl-correct-stem {
    width: 2px;
    height: 18px;
    background: #22c55e;
    margin: 0 auto;
}

.fc-nl-correct-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    background: #22c55e;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
    margin-top: 2px;
}

@media (max-width: 480px) {
    .fc-nl-wrap {
        padding: 0 0.4rem;
    }
    .fc-nl-tick-label { font-size: 0.9rem; }
}
