.main {
    grid-template-columns: 400px minmax(0, 1fr);
}

.main .extra-panel {
    grid-column: 1 / -1;
    margin-top: 0;
}

/* ---- 题目设置 ---- */
.train-form .form-section + .form-section {
    margin-top: 14px;
}

/* ---- 数字键盘 ---- */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.keypad .btn {
    height: 46px;
    font-size: 18px;
    font-weight: 600;
    justify-content: center;
}

.keypad .btn.func {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    font-size: 14px;
}

/* ---- 答案输入区 ---- */
.ans-box {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 46px;
    margin: 10px 0 4px;
}

.ans-chip {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    background: #fff;
}

.ans-chip.filled {
    border-color: #667eea;
    background: #eef2ff;
    color: #4338ca;
}

.ans-chip.pending {
    background: #f9fafb;
    color: #d1d5db;
}

/* ---- 记忆舞台 ---- */
.stage-box {
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    background: #fbfcfe;
}

.stage-digit {
    font-size: 90px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
    animation: pop 0.16s ease;
}

.stage-hint {
    font-size: 14px;
    color: #6b7280;
}

.stage-emoji {
    font-size: 42px;
}

.dots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.dots i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #fff;
}

.dots i.on {
    background: #667eea;
    border-color: #667eea;
}

.vs-row {
    display: flex;
    gap: 34px;
    font-size: 16px;
    color: #374151;
}

.vs-row .lab {
    color: #9ca3af;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.vs-row .val {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 2px;
}

.vs-row .ok  { color: #16a34a; }
.vs-row .bad { color: #ef4444; }

@keyframes pop {
    0%   { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ---- 成绩统计 ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.stat {
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.stat b {
    display: block;
    font-size: 20px;
    color: #4338ca;
    font-variant-numeric: tabular-nums;
}

.stat span {
    font-size: 12px;
    color: #6b7280;
}

/* ---- 本局记录 ---- */
.record-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 16px 0 6px;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #f3f4f6;
    font-size: 13px;
    color: #4b5563;
}

.record-item .tick {
    font-weight: 600;
}

.record-item.ok .tick   { color: #16a34a; }
.record-item.fail .tick { color: #ef4444; }

/* ---- 锁定态 ---- */
.locked {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.2s;
}

@media (max-width: 900px) {
    .main {
        grid-template-columns: 1fr;
    }
}