.main {
    grid-template-columns: 320px minmax(0, 1fr);
}

.main .extra-panel {
    grid-column: 1 / -1;
    margin-top: 0;
}

/* ---- 设置区 ---- */
.train-form .form-section + .form-section {
    margin-top: 14px;
}

.hint-line {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.8;
}

/* ---- 训练舞台 ---- */
.stage-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.arena {
    position: relative;
    width: 100%;
    height: clamp(280px, 52vh, 520px);
    background:
        radial-gradient(circle at 18% 22%, rgba(102, 126, 234, 0.09), transparent 42%),
        radial-gradient(circle at 82% 74%, rgba(118, 75, 162, 0.09), transparent 46%),
        #f0f2f8;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.04);
    touch-action: manipulation;
}

/* ---- 小球 ---- */
.ball {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #8794d8, #667eea 60%, #5566d6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transform: translate(-50%, -50%);
    cursor: pointer;
    user-select: none;
    z-index: 2;
    animation: ball-drop 0.28s ease;
}

.ball.hl {
    background: radial-gradient(circle at 30% 30%, #fcd34d, #f59e0b 60%, #d97706);
    box-shadow: 0 0 0 3px #ffffff, 0 0 16px rgba(245, 158, 11, 0.55);
    z-index: 3;
}

.ball.selected {
    box-shadow: 0 0 0 3px #667eea, 0 0 14px rgba(102, 126, 234, 0.5);
    z-index: 3;
}

.ball.is-target {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

.ball.is-extra {
    outline: 3px solid #ef4444;
    outline-offset: 2px;
}

@keyframes ball-drop {
    0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

/* ---- 阶段状态条（不遮挡小球区） ---- */
.arena-status {
    min-height: 22px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #eef0f4;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    line-height: 1.5;
}

.arena-status.ph-memory {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #b45309;
    font-weight: 600;
}

.arena-status.ph-motion {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
    font-weight: 600;
}

.arena-status.ph-select {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
    font-weight: 600;
}

.arena-status.ph-done.ok {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
    font-weight: 600;
}

.arena-status.ph-done.bad {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    font-weight: 600;
}

/* ---- 成绩统计 ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.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(2, 1fr);
    }
}

/* ---- SEO 文案区美化 ---- */
.extra-panel .seo-article {
    margin: 0 auto;
}

.extra-panel .seo-article h2 {
    position: relative;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
    letter-spacing: 0.5px;
    margin: 26px 0 14px;
    padding-left: 14px;
}

.extra-panel .seo-article h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #667eea, #764ba2);
}

.extra-panel .seo-article h2:first-child {
    margin-top: 4px;
}

.extra-panel .seo-article p {
    font-size: 14px;
    line-height: 2;
    color: #4b5563;
    text-align: justify;
}

.extra-panel .seo-article b,
.extra-panel .seo-article strong {
    color: #4338ca;
    font-weight: 700;
}

.extra-panel .seo-article ol {
    list-style: none;
    counter-reset: seo;
    margin: 10px 0 6px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.extra-panel .seo-article ol li {
    counter-increment: seo;
    position: relative;
    padding: 12px 14px 12px 48px;
    background: #f8faff;
    border: 1px solid #eef0f6;
    border-left: 3px solid #667eea;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.9;
    color: #4b5563;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.extra-panel .seo-article ol li::before {
    content: counter(seo);
    position: absolute;
    left: 14px;
    top: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.extra-panel .seo-article ul {
    list-style: none;
    margin: 10px 0 6px;
    padding: 0;
}

.extra-panel .seo-article ul li {
    position: relative;
    padding: 8px 0 8px 22px;
    font-size: 13px;
    line-height: 1.9;
    color: #4b5563;
    border-bottom: 1px dashed #f0f1f3;
}

.extra-panel .seo-article ul li:last-child {
    border-bottom: none;
}

.extra-panel .seo-article ul li::before {
    content: '▸';
    position: absolute;
    left: 2px;
    top: 13px;
    color: #667eea;
    font-weight: 700;
    font-size: 14px;
}

.extra-panel .seo-article ul li strong {
    color: #4338ca;
    margin-right: 2px;
}