.ftp-question {
    font-family: 'Nunito', system-ui, sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: #163a5f;
    background: linear-gradient(180deg, #f3f9ff, #e9f3ff);
    border: 1px solid #c7dcf2;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 4px 0 16px;
    box-shadow: 0 4px 12px -8px rgba(15, 42, 80, .4);
}

.ftp-stage { font-family: 'Nunito', system-ui, sans-serif; }

/* ---- Sorting bins ------------------------------------------------------- */
.ftp-bins {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.ftp-bin {
    border-radius: 14px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 6px 16px -10px rgba(15, 42, 80, .4);
}

.ftp-bin h3 {
    font-size: 14px; font-weight: 800; margin: 0 0 10px;
    text-align: center; color: #1f2a37;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.ftp-bin h3 i { font-size: 18px; margin-bottom: 2px; }
.ftp-bin h3 small { font-weight: 700; font-size: 11px; color: #64748b; }

.ftp-bin-change  { border-top: 4px solid #f59e0b; }
.ftp-bin-change h3 i  { color: #ea8a04; }
.ftp-bin-measure { border-top: 4px solid #16a34a; }
.ftp-bin-measure h3 i { color: #16a34a; }
.ftp-bin-keep    { border-top: 4px solid #6366f1; }
.ftp-bin-keep h3 i    { color: #6366f1; }

.ftp-drop {
    min-height: 100px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    display: flex; flex-wrap: wrap; gap: 9px; align-content: flex-start;
    background: #f8fafc;
    transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.ftp-drop.ftp-over {
    border-style: solid; border-color: #1565c0; background: #e8f1fd;
    box-shadow: inset 0 0 0 3px rgba(21, 101, 192, .12);
}

/* ---- Variable cards ----------------------------------------------------- */
.ftp-tray-wrap { margin-bottom: 14px; }
.ftp-tray-label {
    font-weight: 800; font-size: 12px; color: #64748b; margin-bottom: 7px;
    text-transform: uppercase; letter-spacing: .08em;
}
.ftp-tray {
    min-height: 60px; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px;
    background: linear-gradient(180deg, #f1f5f9, #e7eef6);
    border: 1px dashed #cbd5e1; border-radius: 14px;
}

.ftp-card {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(180deg, #ffffff, #f3f7fb);
    border: 1.5px solid #cbd5e1; border-radius: 999px;
    padding: 9px 17px 9px 13px;
    font-weight: 800; font-size: 15px; color: #1f2a37;
    cursor: grab; user-select: none; touch-action: none;
    box-shadow: 0 2px 6px rgba(15, 42, 80, .14);
    transition: transform .12s ease, box-shadow .12s ease, border-color .14s ease, background .14s ease;
}
.ftp-card::before {
    content: '\f58e';                      /* fa-grip-vertical */
    font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 11px;
    color: #b3bdc9;
}
.ftp-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -6px rgba(15, 42, 80, .35); }
.ftp-card:active { cursor: grabbing; }
.ftp-card.ftp-dragging { opacity: .35; }
.ftp-card.ftp-correct {
    border-color: #16a34a; background: #f0fdf4; color: #14532d;
    animation: ftp-pop .26s ease;
}
.ftp-card.ftp-correct::before { color: #16a34a; }
.ftp-card.ftp-wrong {
    border-color: #dc2626; background: #fef2f2; color: #991b1b;
    animation: ftp-shake .4s ease;
}

@keyframes ftp-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes ftp-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-3px); } }

/* ---- Check / your turn -------------------------------------------------- */
.ftp-target-panel { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.ftp-callout { font-weight: 800; }
.ftp-callout.is-correct { color: #15803d; }
.ftp-callout.is-miss { color: #b91c1c; }

.ftp-your-turn {
    margin-top: 18px;
    background: #fffaf0;
    border-left: 4px solid #dd6b20;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px -8px rgba(221, 107, 32, .5);
}
.ftp-your-turn-label { font-weight: 800; color: #9a3412; font-size: 13px; margin-bottom: 4px; }
.ftp-your-turn-list { margin: 0; padding-left: 18px; font-size: 14px; color: #334155; }

/* Display mode: cards are read-only (teacher pre-sorts). */
.activity-container.display-mode .ftp-card { cursor: default; }
@media (max-width: 640px) {
    .ftp-bins { grid-template-columns: 1fr; }
}
