/* 三阶魔方入门图解 /tool/cube-guide */

.cg-stepbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.cg-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--calc-border, #e2e8f0);
    background: var(--calc-soft, #f1f5f9);
    font-size: 15px;
    font-weight: 800;
    color: var(--calc-muted, #64748b);
    cursor: pointer;
    transition: all .15s;
}
.cg-dot.is-active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    transform: scale(1.12);
}
.cg-dot.is-done { background: #e0e7ff; border-color: #c7d2fe; color: #4f46e5; }

.cg-step-name { font-size: 20px; font-weight: 800; color: var(--calc-text, #1e293b); margin: 0 0 6px; }
.cg-step-goal { font-size: 15px; line-height: 1.7; color: var(--calc-muted, #64748b); margin: 0 0 14px; }

.cg-cube-wrap { text-align: center; margin-bottom: 14px; }
.cg-cube {
    background: linear-gradient(160deg, #eef2ff, #e0e7ff);
    border-radius: 16px;
    padding: 10px;
    display: inline-block;
}
.cg-cube svg { width: 100%; max-width: 300px; height: auto; display: block; }
.cg-legend-mini {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 13px;
    color: var(--calc-muted, #64748b);
}
.cg-legend-mini i {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, .12);
    margin-right: 4px;
    vertical-align: -2px;
}

.cg-formula { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cg-formula-card {
    background: var(--calc-soft, #f1f5f9);
    border-radius: 12px;
    padding: 12px 14px;
}
.cg-formula-label { font-size: 13px; font-weight: 800; color: #6366f1; margin-bottom: 8px; }
.cg-formula-seq { display: flex; flex-wrap: wrap; gap: 6px; }
.cg-formula-text { font-size: 14px; line-height: 1.7; color: var(--calc-text, #334155); }
.cg-move {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid #c7d2fe;
    font-weight: 800;
    font-size: 15px;
    color: #4338ca;
}

.cg-tip {
    font-size: 14px;
    line-height: 1.7;
    color: var(--calc-text, #334155);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 14px;
}

.cg-nav { display: flex; gap: 10px; justify-content: space-between; }
.cg-nav .btn:disabled { opacity: .4; cursor: not-allowed; }

/* 右侧 */
.cg-side-block {
    padding: 14px;
    border-radius: 14px;
    background: var(--calc-soft, #f8fafc);
    margin-bottom: 14px;
}
.cg-side-block:last-child { margin-bottom: 0; }
.cg-side-title { font-size: 16px; font-weight: 800; color: var(--calc-text, #1e293b); margin: 0 0 10px; }
.cg-side-help { font-size: 13px; color: var(--calc-muted, #64748b); margin: 10px 0 0; line-height: 1.6; }
.cg-scramble {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 40px;
    align-items: center;
    font-size: 14px;
    color: var(--calc-muted, #64748b);
}
.cg-side-btns { display: flex; gap: 8px; margin-top: 10px; }

.cg-check-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cg-streak { font-weight: 800; color: #f59e0b; font-size: 15px; }
.cg-week { display: flex; gap: 6px; margin-top: 12px; }
.cg-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.cg-day-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px dashed var(--calc-border, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}
.cg-day.is-done .cg-day-dot { background: #22c55e; border: 2px solid #22c55e; }
.cg-day.is-today .cg-day-dot { border-color: #6366f1; }
.cg-day-name { font-size: 12px; color: var(--calc-muted, #64748b); }

.cg-notation-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
    color: var(--calc-text, #334155);
}
.cg-notation-mini b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 4px;
    border-radius: 6px;
    background: #6366f1;
    color: #fff;
    margin-right: 6px;
    font-size: 13px;
}

/* 黑夜模式 */
body.dark-mode .cg-dot { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.dark-mode .cg-dot.is-done { background: #312e81; border-color: #4338ca; color: #a5b4fc; }
body.dark-mode .cg-step-name, body.dark-mode .cg-side-title { color: #e2e8f0; }
body.dark-mode .cg-cube { background: linear-gradient(160deg, #1e293b, #171331); }
body.dark-mode .cg-formula-card, body.dark-mode .cg-side-block { background: #1e293b; }
body.dark-mode .cg-move { background: #0f172a; border-color: #4338ca; color: #a5b4fc; }
body.dark-mode .cg-tip { background: #292217; border-color: #a16207; color: #e2e8f0; }
body.dark-mode .cg-day-dot { background: #0f172a; border-color: #334155; }
body.dark-mode .cg-day.is-done .cg-day-dot { background: #15803d; border-color: #15803d; }
body.dark-mode .cg-notation-mini { color: #e2e8f0; }
