.main {
    grid-template-columns: 400px minmax(0, 1fr);
}

.main .extra-panel {
    grid-column: 1 / -1;
    margin-top: 0;
}

/* ---- 设置表单 ---- */
.train-form .form-row + .form-row {
    margin-top: 14px;
}

/* ---- 计时条 ---- */
.timer-bar {
    margin-top: 12px;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 8px;
}

.timer-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 1s linear, background 0.3s;
}

.timer-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.timer-text {
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---- 字符网格 ---- */
.char-grid {
    display: grid;
    gap: 2px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.char-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border: 1px solid #eef0f4;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    user-select: none;
}

.char-cell:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.char-cell:active {
    transform: scale(0.96);
}

.char-cell.revealed {
    cursor: default;
    animation: revealPop 0.3s ease;
}

.char-cell.diff {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #b45309;
    font-weight: 700;
    box-shadow: 0 0 0 2px #fde68a;
}

.char-cell.wrong {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #dc2626;
}

@keyframes revealPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ---- 记忆舞台 ---- */
.stage-box {
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    background: #fbfcfe;
}

.stage-hint {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    max-width: 420px;
}

/* ---- 成绩统计 ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 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; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .main {
        grid-template-columns: 1fr;
    }
    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 520px) {
    .char-grid {
        gap: 1px;
    }
    .char-cell {
        font-size: 16px !important;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}