/* =========================================================
 * tutorial.css - 教程面板（规则速查弹窗）样式
 *
 * 从 style.css 拆出：对应 tutorial.js 的三段式结构
 *   1) 顶部横向标签条（tut-tabs）
 *   2) 中间配图窗口（tut-stage / tut-svg）
 *   3) 底部文字说明（tut-text / tut-line）
 *
 * 注意：.tut-card 与 .modal-card（style.css）同特异度，
 *       本文件必须在 style.css 之后加载，覆盖才能生效。
 * ========================================================= */

/* ==================== 教程面板（三段式） ==================== */
.tut-card {
    max-width: 380px;
    max-height: 88vh;
    min-width: 0;
    gap: 10px;
    padding: 16px 16px 18px;
    /* 暖白纸面：白棋子压在纯白上会糊成一片，这里给一点底色 */
    background: var(--bg-color);
}

/* --- 第一段：点选看哪个 --- */
.tut-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    min-width: 0;
    padding: 3px 0 5px;
    scrollbar-width: thin;
    scrollbar-color: #CFC9BB transparent;
    flex: 0 0 auto;
}

.tut-tabs::-webkit-scrollbar {
    height: 6px;
}

.tut-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.tut-tabs::-webkit-scrollbar-thumb {
    background: #CFC9BB;
    border-radius: 3px;
}

.tut-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    background: var(--bg-color);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tut-tab:active {
    transform: translate(1px, 1px);
}

.tut-tab.active {
    background: var(--text-main);
    color: #FFFFFF;
    box-shadow: 2px 2px 0 var(--shadow-color);
}

.tut-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- 第二段：配图窗口（无边：透明底、无边框、无卡片） --- */
.tut-stage {
    flex: 0 0 auto;
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
}

.tut-stage.is-empty {
    display: none;
}

.tut-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 190px;
    overflow: visible;
}

/* --- 第三段：文字 --- */
.tut-text {
    --tut-accent: var(--text-main);
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-right: 2px;
}

.tut-text::-webkit-scrollbar { width: 4px; }
.tut-text::-webkit-scrollbar-thumb { background: #DCD6C8; border-radius: 2px; }

.tut-line {
    position: relative;
    padding-left: 13px;
    font-size: 0.79rem;
    line-height: 1.6;
    color: var(--text-main);
}

.tut-line::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.66em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--tut-accent);
    opacity: 0.7;
}

/* 窄屏：教程卡片贴边、配图窗口收矮 */
@media (max-width: 420px) {
    .tut-card {
        max-width: 100%;
        padding: 14px 14px 16px;
    }

    .tut-stage,
    .tut-stage.is-empty {
        min-height: 112px;
    }
}
