/* ═══════════════════════════════════════════════
   Prompt 競技場 UI 樣式
   ═══════════════════════════════════════════════ */

/* ── 編輯器預覽 ── */
.skill-battle-preview {
    display: flex; flex-direction: column; gap: 12px;
    padding: 20px; height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 12px; color: #fff;
}
.sb-preview-header {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.1rem; font-weight: 700;
    color: #a5b4fc;
}
.sb-preview-header .material-symbols-outlined { color: #818cf8; }
.sb-preview-task {
    font-size: 0.88rem; color: #cbd5e1; line-height: 1.6;
    padding: 12px; background: rgba(255,255,255,0.06);
    border-radius: 8px; border-left: 3px solid #6366f1;
}
.sb-preview-meta {
    display: flex; gap: 16px; font-size: 0.75rem; color: #64748b;
}

/* ── 通用 ── */
.skill-battle-container {
    font-family: 'Noto Sans TC', 'Google Sans', sans-serif;
    overflow-y: auto;
}

/* ── 學員端 ── */
.sb-student { display: flex; flex-direction: column; gap: 14px; padding: 16px; height: 100%; }

/* 左右分割版面 */
.sb-student-layout {
    display: flex; gap: 20px; flex: 1; min-height: 0;
}
.sb-student-left {
    flex: 0 0 42%; display: flex; flex-direction: column; gap: 12px;
    overflow-y: auto;
}
.sb-student-right {
    flex: 1; display: flex; flex-direction: column; gap: 10px;
}

.sb-task-section {
    background: #f8fafc; border-radius: 12px; padding: 16px;
    border-left: 3px solid #6366f1; flex: 1;
}
.sb-task-label {
    font-size: 0.8rem; color: #6366f1; font-weight: 600;
    display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.sb-copy-task-btn {
    margin-left: auto; padding: 3px 10px;
    border: 1px solid #c7d2fe; border-radius: 6px;
    background: #eef2ff; color: #6366f1;
    font-size: 0.7rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; gap: 3px;
    white-space: nowrap;
}
.sb-copy-task-btn:hover { background: #c7d2fe; }
.sb-task-text {
    font-size: 0.88rem; color: #334155; line-height: 1.7;
    white-space: pre-wrap; word-break: break-word;
}
.sb-input-section { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sb-input-label {
    font-size: 0.8rem; color: #475569; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}
.sb-skill-input {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: 0.88rem; line-height: 1.6; resize: vertical;
    transition: border-color 0.2s; font-family: inherit;
    background: #fff; flex: 1;
}
.sb-skill-input:focus { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.sb-skill-input:disabled { background: #f1f5f9; color: #64748b; }
.sb-input-footer {
    display: flex; justify-content: space-between; align-items: center;
}
.sb-char-count { font-size: 0.72rem; color: #94a3b8; }
.sb-submit-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 8px; border: none;
    background: #6366f1; color: #fff; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.sb-submit-btn:hover:not(:disabled) { background: #4f46e5; transform: translateY(-1px); }
.sb-submit-btn:disabled { background: #94a3b8; cursor: not-allowed; }

/* ── Skill 模式欄位 ── */
.sb-field-group {
    display: flex; flex-direction: column; gap: 4px;
}
.sb-field-label {
    font-size: 0.75rem; font-weight: 600; color: #6366f1;
    display: flex; align-items: center; gap: 5px;
}
.sb-skill-name-input {
    width: 100%; padding: 8px 12px;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 0.88rem; font-family: inherit;
    transition: border-color 0.2s; background: #fff;
}
.sb-skill-name-input:focus { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.sb-skill-name-input:disabled { background: #f1f5f9; color: #64748b; }
.sb-skill-desc-input,
.sb-skill-detail-input {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 0.82rem; line-height: 1.6; resize: vertical;
    font-family: inherit; transition: border-color 0.2s;
    background: #fff;
}
.sb-skill-desc-input:focus,
.sb-skill-detail-input:focus {
    border-color: #6366f1; outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.sb-skill-desc-input:disabled,
.sb-skill-detail-input:disabled { background: #f1f5f9; color: #64748b; }

.sb-waiting {
    display: flex; align-items: center; gap: 8px;
    padding: 14px; background: #fffbeb; border-radius: 10px;
    font-size: 0.85rem; color: #92400e;
}

/* ── 學員結果卡片 ── */
.sb-result-card {
    background: #fff; border-radius: 14px; padding: 18px;
    border: 1px solid #e2e8f0; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.sb-result-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: #6366f1; font-weight: 600; margin-bottom: 12px;
}
.sb-result-score {
    font-size: 2.5rem; font-weight: 800; text-align: center;
    font-family: 'Google Sans', sans-serif;
}
.sb-score-unit { font-size: 1rem; font-weight: 500; }
.sb-result-bar {
    width: 100%; height: 8px; background: #f1f5f9; border-radius: 4px;
    overflow: hidden; margin: 10px 0;
}
.sb-result-bar-fill {
    height: 100%; border-radius: 4px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.sb-result-feedback {
    font-size: 0.82rem; color: #475569; padding: 10px;
    background: #f8fafc; border-radius: 8px; margin-top: 8px;
    display: flex; align-items: flex-start; gap: 6px;
}
.sb-result-output-section { margin-top: 10px; }
.sb-result-output-label {
    font-size: 0.78rem; color: #6366f1; font-weight: 600;
    display: flex; align-items: center; gap: 4px; margin-bottom: 6px;
}
.sb-result-output {
    padding: 12px; background: #1e1e2e; color: #a6e3a1;
    border-radius: 8px; font-size: 0.82rem; line-height: 1.7;
    font-family: 'SF Mono', 'Fira Code', monospace; white-space: pre-wrap;
    max-height: 180px; overflow-y: auto;
}
.sb-resubmit-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 10px; border-radius: 8px; border: 1.5px solid #6366f1;
    background: transparent; color: #6366f1;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s; margin-top: 12px;
}
.sb-resubmit-btn:hover { background: #6366f1; color: #fff; }

/* ── 教師端 ── */
.sb-teacher { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.sb-teacher-header {
    display: flex; justify-content: space-between; align-items: center;
}
.sb-teacher-title {
    font-size: 1rem; font-weight: 700; color: #0f172a;
    display: flex; align-items: center; gap: 8px;
}
.sb-teacher-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sb-btn {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 12px; border-radius: 8px; border: none;
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.sb-btn-refresh { background: #f1f5f9; color: #475569; }
.sb-btn-refresh:hover { background: #e2e8f0; }
.sb-btn-reset-all { background: #fef2f2; color: #dc2626; }
.sb-btn-reset-all:hover { background: #fee2e2; }
.sb-btn-execute-all { background: #6366f1; color: #fff; }
.sb-btn-execute-all:hover:not(:disabled) { background: #4f46e5; }
.sb-btn-execute-all:disabled { background: #94a3b8; }
.sb-teacher-stats {
    display: flex; gap: 16px; font-size: 0.78rem; color: #64748b;
}
.sb-stat { display: flex; align-items: center; gap: 4px; }

/* ── 網格卡片佈局（適合 20-30 人）── */
.sb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 2px;
}
.sb-empty {
    grid-column: 1 / -1;
    text-align: center; padding: 24px; color: #94a3b8; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ── 卡片 ── */
.sb-card {
    display: flex; flex-direction: column; gap: 6px;
    padding: 10px 12px; border-radius: 10px;
    border: 1px solid #e2e8f0; background: #fff;
    transition: all 0.3s; position: relative;
    min-height: 80px;
}
.sb-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.sb-card-pending { border-left: 3px solid #cbd5e1; }
.sb-card-scored {
    border-left: 3px solid #22c55e;
    background: linear-gradient(135deg, #f0fdf4, #fff);
}

/* ── 執行中動畫 ── */
.sb-card-running, .sb-card.sb-card-running {
    border-left: 3px solid #eab308;
    background: #fffbeb;
    animation: sb-card-pulse 1.2s ease-in-out infinite;
}
@keyframes sb-card-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234,179,8,0.2); }
    50% { box-shadow: 0 0 0 6px rgba(234,179,8,0.08); }
}

.sb-card-header {
    display: flex; justify-content: space-between; align-items: center;
}
.sb-card-name {
    font-size: 0.82rem; font-weight: 700; color: #1e293b;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 110px;
}
.sb-card-score {
    font-size: 1.2rem; font-weight: 900;
    font-family: 'Google Sans', sans-serif;
    line-height: 1;
}
.sb-card-status-icon { color: #94a3b8; }
.sb-card-preview {
    font-size: 0.68rem; color: #64748b; line-height: 1.4;
    padding: 4px 6px; background: #f8fafc; border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sb-card-feedback {
    font-size: 0.68rem; color: #475569; line-height: 1.4;
    padding: 3px 6px; background: #f0fdf4; border-radius: 4px;
    border-left: 2px solid #22c55e;
}
.sb-card-output-details { margin-top: 2px; }
.sb-card-output-details summary {
    font-size: 0.66rem; color: #6366f1; cursor: pointer;
    display: flex; align-items: center; gap: 3px;
}
.sb-card-output {
    font-size: 0.66rem; color: #475569; line-height: 1.5;
    padding: 6px; background: #1e1e2e; color: #a6e3a1;
    border-radius: 6px; font-family: 'SF Mono', monospace;
    white-space: pre-wrap; max-height: 80px; overflow-y: auto;
    margin-top: 4px;
}
.sb-card-exec-btn {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 5px 10px; border-radius: 6px; border: none;
    background: #0d9488; color: #fff;
    font-size: 0.72rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s; width: 100%;
}
.sb-card-exec-btn:hover:not(:disabled) { background: #0f766e; }
.sb-card-exec-btn:disabled { background: #94a3b8; }

/* ── 執行日誌 ── */
.sb-execution-log {
    max-height: 100px; overflow-y: auto;
    font-size: 0.72rem; line-height: 1.8;
    border-top: 1px solid #f1f5f9; padding-top: 8px; margin-top: 4px;
}
.sb-log-line { display: flex; align-items: flex-start; gap: 6px; padding: 2px 0; }
.sb-log-time { color: #94a3b8; flex-shrink: 0; font-family: 'SF Mono', monospace; font-size: 0.68rem; }
.sb-log-info { color: #475569; }
.sb-log-success { color: #15803d; }
.sb-log-error { color: #dc2626; }

/* ═══════════════════════════════════════════════
   獨立排行榜元件 — SkillBattleBoardGame
   ═══════════════════════════════════════════════ */

/* ── 編輯器預覽 ── */
.sb-board-preview {
    display: flex; flex-direction: column; gap: 16px;
    padding: 24px; height: 100%;
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    border-radius: 12px; color: #fff;
}
.sb-board-preview-header {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.1rem; font-weight: 700; color: #a5b4fc;
}
.sb-board-preview-body { display: flex; flex-direction: column; gap: 8px; }
.sb-board-preview-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 8px;
    background: rgba(255,255,255,0.06); font-size: 0.88rem;
}
.sb-board-preview-row span:first-child { font-size: 1.2rem; }
.sb-board-preview-row span:nth-child(2) { flex: 1; color: #cbd5e1; }
.sb-board-preview-row span:last-child { color: #64748b; font-weight: 700; }

/* ── Live 排行榜 ── */
.sb-board-container {
    font-family: 'Noto Sans TC', 'Google Sans', sans-serif;
}
.sb-board {
    height: 100%; display: flex; flex-direction: column;
    padding: 20px 24px; gap: 16px;
}
.sb-board-title-bar {
    display: flex; justify-content: space-between; align-items: baseline;
}
.sb-board-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.15rem; font-weight: 800; color: #0f172a;
}
.sb-board-title .material-symbols-outlined { color: #6366f1; font-size: 26px; }
.sb-board-subtitle {
    font-size: 0.72rem; color: #94a3b8; font-weight: 500;
    display: flex; align-items: center; gap: 4px;
}
.sb-board-subtitle::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e; animation: sb-dot-pulse 2s ease-in-out infinite;
}
@keyframes sb-dot-pulse {
    0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
}
.sb-board-list {
    flex: 1; display: flex; flex-direction: column; gap: 8px;
    overflow-y: auto; padding-right: 4px;
}
.sb-board-empty {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 8px; color: #94a3b8; font-size: 0.9rem;
}

/* ── 排行列 ── */
.sb-board-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    background: #fff; border: 1px solid #e2e8f0;
    animation: sb-board-enter 0.5s ease-out both;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sb-board-row:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
@keyframes sb-board-enter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Top 3 */
.sb-board-gold {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fbbf24;
    box-shadow: 0 2px 12px rgba(251,191,36,0.15);
}
.sb-board-silver {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: #cbd5e1;
}
.sb-board-bronze {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-color: #fdba74;
}

/* 名次 */
.sb-board-rank {
    width: 36px; height: 36px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.sb-board-medal-emoji { font-size: 1.5rem; }
.sb-board-rank-num {
    width: 28px; height: 28px; border-radius: 8px;
    background: #e2e8f0; color: #475569;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 800;
    font-family: 'Google Sans', sans-serif;
}

/* 資訊 */
.sb-board-info { flex: 1; min-width: 0; }
.sb-board-name {
    font-size: 0.92rem; font-weight: 700; color: #1e293b;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-board-feedback {
    font-size: 0.7rem; color: #64748b; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 分數條 */
.sb-board-bar-wrap { flex: 1; min-width: 60px; }
.sb-board-bar {
    height: 10px; background: rgba(0,0,0,0.04);
    border-radius: 5px; overflow: hidden;
}
.sb-board-bar-fill {
    height: 100%; border-radius: 5px; width: 0;
    animation: sb-bar-grow 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes sb-bar-grow {
    to { width: var(--bar-w, 100%); }
}

/* 分數 */
.sb-board-score-wrap {
    display: flex; flex-direction: column; align-items: center;
    min-width: 44px; flex-shrink: 0;
}
.sb-board-score {
    font-size: 1.3rem; font-weight: 900; color: #0f172a;
    line-height: 1; font-family: 'Google Sans', sans-serif;
    font-variant-numeric: tabular-nums;
}
.sb-board-score-label {
    font-size: 0.6rem; font-weight: 500; color: #94a3b8;
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════
   提示詞檢討牆 — SkillBattleReviewGame
   ═══════════════════════════════════════════════ */

/* ── 編輯器預覽 ── */
.sb-review-preview {
    display: flex; flex-direction: column; gap: 16px;
    padding: 24px; height: 100%;
    background: linear-gradient(135deg, #0f172a, #2e1065);
    border-radius: 12px; color: #fff;
}
.sb-review-preview-header {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.1rem; font-weight: 700; color: #c4b5fd;
}
.sb-review-preview-header .material-symbols-outlined { color: #a78bfa; }
.sb-review-preview-body { display: flex; flex-direction: column; gap: 8px; }
.sb-review-preview-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-radius: 8px;
    background: rgba(255,255,255,0.06); font-size: 0.88rem;
}
.sb-review-preview-left {
    display: flex; align-items: center; gap: 10px; color: #cbd5e1;
}
.sb-review-preview-badge {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(167,139,250,0.25); color: #c4b5fd;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800;
}
.sb-review-preview-score {
    font-size: 1.3rem; font-weight: 900;
    font-family: 'Google Sans', sans-serif;
}

/* ── Live 檢討牆 ── */
.sb-review-container {
    font-family: 'Noto Sans TC', 'Google Sans', sans-serif;
}
.sb-review {
    height: 100%; display: flex; flex-direction: column;
    padding: 20px 24px; gap: 14px;
}
.sb-review-title-bar {
    display: flex; justify-content: space-between; align-items: baseline;
    flex-shrink: 0;
}
.sb-review-title {
    font-size: 1.15rem; font-weight: 800; color: #0f172a;
}
.sb-review-subtitle {
    font-size: 0.72rem; color: #94a3b8; font-weight: 500;
    display: flex; align-items: center; gap: 4px;
}
.sb-review-subtitle::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: #a78bfa; animation: sb-dot-pulse 2s ease-in-out infinite;
}
.sb-review-filter {
    padding: 4px 8px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 0.72rem; font-weight: 600; color: #475569;
    background: #fff; cursor: pointer; max-width: 180px;
}
.sb-review-filter:focus { border-color: #6366f1; outline: none; }
.sb-review-list {
    flex: 1; display: flex; flex-direction: column; gap: 10px;
    overflow-y: auto; padding-right: 4px;
}
.sb-review-empty {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 8px; color: #94a3b8; font-size: 0.9rem;
}

/* ── 單行列 ── */
.sb-review-row {
    padding: 14px 16px; border-radius: 12px;
    background: #fff; border: 1px solid #e2e8f0;
    border-left: 4px solid var(--row-border-color, #94a3b8);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    animation: sb-review-enter 0.45s ease-out both;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column; gap: 10px;
}
.sb-review-row:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 14px rgba(0,0,0,0.07);
}
@keyframes sb-review-enter {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 列頭 */
.sb-review-row-header {
    display: flex; justify-content: space-between; align-items: center;
}
.sb-review-row-left {
    display: flex; align-items: center; gap: 8px;
}
.sb-review-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    color: #fff; font-size: 0.7rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sb-review-name {
    font-size: 0.92rem; font-weight: 700; color: #1e293b;
}
.sb-review-row-right {
    display: flex; align-items: center;
}
.sb-review-score {
    font-size: 1.6rem; font-weight: 900; line-height: 1;
    font-family: 'Google Sans', sans-serif;
    font-variant-numeric: tabular-nums;
}
.sb-review-score-unit {
    font-size: 0.75rem; font-weight: 600;
}
.sb-review-pending {
    font-size: 0.82rem; color: #94a3b8; font-weight: 500;
}

/* Prompt 區塊 */
.sb-review-prompt {
    padding: 12px 14px;
    background: #1e1e2e; color: #a6e3a1;
    border-radius: 8px; font-size: 0.82rem; line-height: 1.7;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    white-space: pre-wrap; word-break: break-all;
}

/* 回饋 */
.sb-review-feedback {
    font-size: 0.8rem; color: #475569; line-height: 1.5;
    padding: 8px 12px; background: #f0fdf4; border-radius: 8px;
    border-left: 3px solid #86efac;
}

/* AI 輸出（可折疊） */
.sb-review-output-details { margin-top: 0; }
.sb-review-output-details summary {
    font-size: 0.78rem; color: #6366f1; cursor: pointer;
    display: flex; align-items: center; gap: 4px;
    font-weight: 600; user-select: none;
    padding: 4px 0;
}
.sb-review-output-details summary:hover { color: #4f46e5; }
.sb-review-output {
    padding: 12px 14px;
    background: #1e1e2e; color: #cdd6f4;
    border-radius: 8px; font-size: 0.78rem; line-height: 1.7;
    font-family: 'SF Mono', 'Fira Code', monospace;
    white-space: pre-wrap; word-break: break-all;
    max-height: 200px; overflow-y: auto;
    margin-top: 6px;
}

/* ── 改進建議 ── */
.sb-review-suggestions {
    font-size: 0.78rem; color: #6d28d9; line-height: 1.6;
    padding: 8px 12px; background: #f5f3ff; border-radius: 8px;
    border-left: 3px solid #a78bfa;
}

/* ═══════════════════════════════════════════════
   排行榜 Toggle 開關
   ═══════════════════════════════════════════════ */
.sb-board-toggle {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; user-select: none;
}
.sb-board-toggle input { display: none; }
.sb-toggle-slider {
    position: relative; width: 34px; height: 18px;
    background: #cbd5e1; border-radius: 9px;
    transition: background 0.25s;
    flex-shrink: 0;
}
.sb-toggle-slider::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.sb-board-toggle input:checked + .sb-toggle-slider {
    background: #6366f1;
}
.sb-board-toggle input:checked + .sb-toggle-slider::after {
    transform: translateX(16px);
}
.sb-toggle-label {
    font-size: 0.72rem; color: #64748b; font-weight: 600;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   學員端結果卡 — 改進建議
   ═══════════════════════════════════════════════ */
.sb-result-suggestions {
    margin-top: 10px; padding: 12px 14px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-radius: 10px; border-left: 3px solid #8b5cf6;
}
.sb-result-suggestions-title {
    font-size: 0.82rem; font-weight: 700; color: #6d28d9;
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 6px;
}
.sb-result-suggestions-body {
    font-size: 0.82rem; color: #4c1d95; line-height: 1.7;
    white-space: pre-wrap;
}

/* 學員端 AI 輸出改為可折疊 */
.sb-result-output-section { margin-top: 10px; }
.sb-result-output-section summary.sb-result-output-label {
    font-size: 0.78rem; color: #6366f1; font-weight: 600;
    display: flex; align-items: center; gap: 4px;
    cursor: pointer; user-select: none; padding: 4px 0;
}
.sb-result-output-section summary.sb-result-output-label:hover { color: #4f46e5; }
