/* /Components/BarChartRenderer.razor.rz.scp.css */
/* ─── BarChartRenderer ────────────────────────────────────────────────── */

.bar-chart-container[b-xpex189hee] {
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-main);
}

    .bar-chart-container:hover[b-xpex189hee]::after {
        content: '▶';
        position: absolute;
        font-size: 4rem;
        color: rgba(255, 255, 255, 0.3);
        pointer-events: none;
    }

    .bar-chart-container.playing:hover[b-xpex189hee]::after {
        content: '⏸';
    }
/* /Components/CircularRenderer.razor.rz.scp.css */
/* ─── CircularRenderer ────────────────────────────────────────────────── */

.circular-chart-container[b-d7f98657q7] {
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-main);
}

    .circular-chart-container:hover[b-d7f98657q7]::after {
        content: '▶';
        position: absolute;
        font-size: 4rem;
        color: rgba(255, 255, 255, 0.3);
        pointer-events: none;
    }

    .circular-chart-container.playing:hover[b-d7f98657q7]::after {
        content: '⏸';
    }
/* /Components/ComparisonStatsTable.razor.rz.scp.css */
/* ─── ComparisonStatsTable — カードリスト + バーチャート モーダル ──────── */

/* モーダルオーバーレイ */
.cst-overlay[b-ji8s6460en] {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: scroll;
}

/* モーダル本体 */
.cst-dialog[b-ji8s6460en] {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    width: min(680px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* モーダルヘッダー */
.cst-dialog-header[b-ji8s6460en] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #252525;
    border-bottom: 1px solid #333;
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cst-dialog-title[b-ji8s6460en] {
    font-size: 1em;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
    flex: 1;
    white-space: nowrap;
}

.cst-header-controls[b-ji8s6460en] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cst-sort-label[b-ji8s6460en] {
    font-size: 0.85em;
    color: #888;
    white-space: nowrap;
}

.cst-sort-select[b-ji8s6460en] {
    padding: 0.3rem 0.5rem;
    background: #2a2a2a;
    color: var(--text-light);
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
}

    .cst-sort-select:focus[b-ji8s6460en] {
        outline: none;
        border-color: var(--color-compare);
    }

.cst-copy-dropdown[b-ji8s6460en] {
    position: relative;
}

.cst-copy-btn[b-ji8s6460en] {
    padding: 0.3rem 0.6rem;
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s;
}

    .cst-copy-btn:hover[b-ji8s6460en] {
        background: #2563EB;
    }

.cst-copy-menu[b-ji8s6460en] {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    min-width: 140px;
    z-index: 1000;
    overflow: hidden;
}

.cst-copy-menu-item[b-ji8s6460en] {
    display: block;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: transparent;
    color: #fff;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s;
}

    .cst-copy-menu-item:hover[b-ji8s6460en] {
        background: #3B82F6;
    }

.cst-close-btn[b-ji8s6460en] {
    padding: 0.3rem 0.5rem;
    background: transparent;
    color: #aaa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

    .cst-close-btn:hover[b-ji8s6460en] {
        color: #EF4444;
    }

/* カードリスト（スクロール領域） */
.cst-card-list[b-ji8s6460en] {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* アルゴリズムカード */
.cst-card[b-ji8s6460en] {
    background: #252525;
    border: 1px solid #333;
    border-radius: 7px;
}

.cst-card--done[b-ji8s6460en] {
    border-color: rgba(16, 185, 129, 0.35);
}

/* カードヘッダー行 */
.cst-card-header[b-ji8s6460en] {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
}

.cst-rank[b-ji8s6460en] {
    font-size: 1.05em;
    min-width: 1.6em;
    text-align: center;
    flex-shrink: 0;
}

.cst-algo-name[b-ji8s6460en] {
    font-weight: 600;
    color: #3B82F6;
    font-size: 0.95em;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cst-complexity[b-ji8s6460en] {
    font-family: 'Courier New', monospace;
    color: #A855F7;
    font-size: 0.82em;
    flex-shrink: 0;
}

.cst-exec-time[b-ji8s6460en] {
    color: #FBBF24;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    flex-shrink: 0;
}

.cst-status[b-ji8s6460en] {
    font-size: 0.82em;
    font-weight: 500;
    flex-shrink: 0;
}

.cst-status--done[b-ji8s6460en] {
    color: var(--color-sorted);
}

.cst-status--running[b-ji8s6460en] {
    color: #F59E0B;
}

/* メトリクスセクション */
.cst-metrics[b-ji8s6460en] {
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 100px;
}

.cst-metric-row[b-ji8s6460en] {
    display: grid;
    grid-template-columns: 5.5rem 1fr 7rem;
    align-items: center;
    gap: 0.5rem;
}

.cst-metric-label[b-ji8s6460en] {
    font-size: 0.82em;
    color: #888;
    text-align: right;
    flex-shrink: 0;
}

/* バートラック */
.cst-bar-track[b-ji8s6460en] {
    height: 8px;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.cst-bar-fill[b-ji8s6460en] {
    height: 100%;
    background: var(--color-compare);
    border-radius: 4px;
    transition: width 0.3s ease;
    min-width: 2px;
}

.cst-bar-fill--best[b-ji8s6460en] {
    background: var(--color-sorted);
}

/* 数値ラベル */
.cst-metric-value[b-ji8s6460en] {
    font-family: 'Courier New', monospace;
    font-size: 0.82em;
    color: #ccc;
    text-align: right;
    white-space: nowrap;
}

.cst-metric-value--best[b-ji8s6460en] {
    color: var(--color-sorted);
    font-weight: 600;
}

/* ─── スマホ: フルスクリーン表示 ─────────────────────────────────────── */
@media (max-width: 767px) {
    .cst-overlay[b-ji8s6460en] {
        padding: 0;
    }

    .cst-dialog[b-ji8s6460en] {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .cst-card-header[b-ji8s6460en] {
        padding: 0.5rem;
        gap: 0.4rem;
        font-size: 0.9em;
    }

    .cst-rank[b-ji8s6460en] {
        font-size: 1em;
    }

    .cst-algo-name[b-ji8s6460en] {
        font-size: 0.9em;
    }

    .cst-complexity[b-ji8s6460en] {
        font-size: 0.75em;
    }

    .cst-exec-time[b-ji8s6460en] {
        font-size: 0.75em;
    }

    .cst-status[b-ji8s6460en] {
        font-size: 0.75em;
    }

    .cst-metrics[b-ji8s6460en] {
        padding: 0.5rem;
        gap: 0.4rem;
    }

    .cst-metric-row[b-ji8s6460en] {
        grid-template-columns: 4.5rem 1fr 5.5rem;
        gap: 0.35rem;
        font-size: 0.9em;
    }

    .cst-metric-label[b-ji8s6460en] {
        font-size: 0.75em;
    }

    .cst-metric-value[b-ji8s6460en] {
        font-size: 0.75em;
    }

    .cst-bar-track[b-ji8s6460en] {
        height: 6px;
    }
}
/* /Components/DisparityChordsRenderer.razor.rz.scp.css */
/* ─── DisparityChordsRenderer ─────────────────────────────────────────── */

.disparity-chords-container[b-6vui79esro] {
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-main);
}

    .disparity-chords-container:hover[b-6vui79esro]::after {
        content: '▶';
        position: absolute;
        font-size: 4rem;
        color: rgba(255, 255, 255, 0.3);
        pointer-events: none;
    }

    .disparity-chords-container.playing:hover[b-6vui79esro]::after {
        content: '⏸';
    }
/* /Components/Footer.razor.rz.scp.css */
/* ─── Site Footer ────────────────────────────────────────────────────────── */

.site-footer[b-uggh8g8zkr] {
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem 0.25rem 1.5rem;
    margin-top: auto;
}

.footer-content[b-uggh8g8zkr] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: var(--page-max-width, 1920px);
    margin: 0 auto;
}

.footer-privacy[b-uggh8g8zkr] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links[b-uggh8g8zkr] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-icon[b-uggh8g8zkr] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--color-accent);
}

.footer-text[b-uggh8g8zkr] {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.footer-tech[b-uggh8g8zkr] {
    font-size: 0.8rem;
}

.footer-link[b-uggh8g8zkr] {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

    .footer-link:hover[b-uggh8g8zkr] {
        color: var(--color-accent-hover);
        text-decoration: underline;
    }

.footer-separator[b-uggh8g8zkr] {
    color: var(--text-disabled);
    font-size: 0.85rem;
}

/* PC: 右寄せ */
@media (min-width: 768px) {
    .footer-content[b-uggh8g8zkr] {
        flex-direction: row;
        justify-content: flex-end;
        gap: 1.5rem;
    }

    .footer-links[b-uggh8g8zkr] {
        justify-content: flex-end;
    }
}
/* /Components/PlayControlBar.razor.rz.scp.css */
/* ─── PlayControlBar ──────────────────────────────────────────────────── */

.play-control-bar[b-ztxzsvel9x] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    flex-shrink: 0;
    width: 100%;
}

.play-control-info[b-ztxzsvel9x] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.play-control-buttons[b-ztxzsvel9x] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.play-control-btn[b-ztxzsvel9x] {
    flex: 1;
    max-width: 180px;
    height: 60px;
    padding: 0;
    border: 1px solid;
    border-radius: 8px;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s, opacity 0.15s;
}

    .play-control-btn svg[b-ztxzsvel9x] {
        width: 28px;
        height: 28px;
        display: block;
    }

    .play-control-btn:hover:not(:disabled)[b-ztxzsvel9x] {
        /* ボタンごとの色変化のみ */
    }

    .play-control-btn:active:not(:disabled)[b-ztxzsvel9x] {
        /* ボタンごとの色変化のみ */
    }

    .play-control-btn:disabled[b-ztxzsvel9x],
    .play-control-btn:disabled:hover[b-ztxzsvel9x] {
        opacity: 0.35;
        cursor: not-allowed;
    }

.btn-play[b-ztxzsvel9x] {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.5);
}

    .btn-play:hover:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(59, 130, 246, 0.35);
        border-color: #3b82f6;
    }

    .btn-play:active:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(59, 130, 246, 0.5);
        border-color: #2563eb;
    }

.btn-pause[b-ztxzsvel9x] {
    background-color: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.5);
}

    .btn-pause:hover:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(168, 85, 247, 0.35);
        border-color: #a855f7;
    }

    .btn-pause:active:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(168, 85, 247, 0.5);
        border-color: #9333ea;
    }

.btn-stop[b-ztxzsvel9x] {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.5);
}

    .btn-stop:hover:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(239, 68, 68, 0.35);
        border-color: #ef4444;
    }

    .btn-stop:active:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(239, 68, 68, 0.5);
        border-color: #dc2626;
    }

.btn-clear[b-ztxzsvel9x] {
    background-color: rgba(249, 115, 22, 0.2);
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.5);
}

    .btn-clear:hover:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(249, 115, 22, 0.35);
        border-color: #f97316;
    }

    .btn-clear:active:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(249, 115, 22, 0.5);
        border-color: #ea6800;
    }

.btn-sound-on[b-ztxzsvel9x] {
    background-color: var(--bg-button);
    color: var(--color-sound-on);
    border-color: var(--color-sound-border);
}

    .btn-sound-on:hover:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(250, 189, 47, 0.35);
        border-color: #fabd2f;
    }

    .btn-sound-on:active:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(250, 189, 47, 0.5);
        border-color: #d39d26;
    }

.btn-sound-off[b-ztxzsvel9x] {
    background-color: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
    border-color: rgba(107, 114, 128, 0.5);
}

    .btn-sound-off:hover:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(107, 114, 128, 0.35);
        border-color: #6b7280;
    }

    .btn-sound-off:active:not(:disabled)[b-ztxzsvel9x] {
        background-color: rgba(107, 114, 128, 0.5);
        border-color: #4b5563;
    }

.play-control-status[b-ztxzsvel9x] {
    font-size: 0.9rem;
    color: #F59E0B;
    font-weight: 500;
    text-align: center;
    min-height: 1.35rem;
    display: block;
}

.play-control-array-size[b-ztxzsvel9x] {
    font-size: 0.85rem;
    color: #60a5fa;
    font-family: 'Courier New', monospace;
    background: #1e2a3a;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* ─── タブレット ──────────────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1279px) {
    .play-control-btn[b-ztxzsvel9x] {
        height: 40px;
        max-width: 100px;
        font-size: 1.2rem;
    }
}

/* ─── スマホ ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .play-control-btn[b-ztxzsvel9x] {
        height: 40px;
        max-width: 100px;
        font-size: 1.2rem;
    }
}
/* /Components/QuickAccessPanel.razor.rz.scp.css */
/* ─── QuickAccessPanel (qap) 専用スタイル ─────────────────────────────── */
/* 注: .qap__item, .stat-label, .stat-value, .ui-card 等は
   TutorialPage でも使用するため app.css に残します */

/* カードパネル (PC: left sidebar) */
.qap[b-fafradsgq2] {
    grid-column: 1;
    grid-row: 2;
    background-color: var(--bg-panel);
    border-radius: 8px;
    overflow-y: auto;
    padding: 16px;
}

/* パネルのコンテンツ */
.qap__content[b-fafradsgq2] {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* パネルタイトル行 (不要なのでコメント化、将来使用する可能性あり) */
/*
.qap__title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.qap__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
*/

.qap__label-row[b-fafradsgq2] {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: space-between;
}

/* ラベルと?リンクを左グループとして束ねる */
.qap__label-group[b-fafradsgq2] {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qap__help-link[b-fafradsgq2] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #3A3A3A;
    color: #999;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s;
}

    .qap__help-link:hover[b-fafradsgq2] {
        background: var(--color-accent);
        color: #fff;
    }

.qap__fps[b-fafradsgq2] {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 4px;
}

.qap__complexity[b-fafradsgq2] {
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    color: var(--color-accent);
}

.qap__btn-full[b-fafradsgq2] {
    width: 100%;
}

/* アクショングループ: ボタンのみを含む専用アイテム */
.qap__item--action-group[b-fafradsgq2] {
    padding: 8px 10px;
}

/* ステータス表示: 進捗カウンターを表示する専用エリア */
.qap__item--status[b-fafradsgq2] {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    padding: 8px 12px;
    margin-top: 4px;
}

.qap__count-label[b-fafradsgq2] {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.qap__count[b-fafradsgq2] {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-primary);
}

.qap__count--max[b-fafradsgq2] {
    color: #f59e0b;
    font-weight: 700;
}

/* ── アルゴリズム説明カード ── */
.algorithm-description-card[b-fafradsgq2] {
    background: linear-gradient(135deg, var(--color-tutorial-bg-start) 0%, var(--color-tutorial-bg-end) 100%);
    border: 1px solid rgba(127, 168, 111, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.algorithm-description-card__header[b-fafradsgq2] {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.algorithm-description-card__label[b-fafradsgq2] {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.8;
}

.algorithm-description-card__title[b-fafradsgq2] {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-tutorial-accent);
    margin: 0;
    line-height: 1.2;
}

.algorithm-description-card__text[b-fafradsgq2] {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-tutorial-text);
    margin: 0;
}

/* トグルボタン: PC では非表示、タブレット・スマホで表示 */
.algorithm-description-card__toggle[b-fafradsgq2] {
    display: none;
    background: rgba(142, 192, 124, 0.15);
    border: 1px solid rgba(142, 192, 124, 0.3);
    border-radius: 4px;
    color: var(--color-tutorial-accent);
    font-size: 0.7rem;
    padding: 3px 7px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

    .algorithm-description-card__toggle:hover[b-fafradsgq2] {
        background: rgba(142, 192, 124, 0.25);
        border-color: var(--color-tutorial-accent);
    }

/* 折りたたみ時にボディを隠す */
.algorithm-description-card__body--hidden[b-fafradsgq2] {
    display: none;
}

/* ─── タブレット/モバイル ─────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1279px) {
    /* QuickAccessPanel は上段に配置 */
    .qap[b-fafradsgq2] {
        grid-column: 1;
        grid-row: 2;
        background-color: transparent;
        padding: 0 10px;
        border-radius: 0;
        overflow-y: visible;
    }

    .qap__content[b-fafradsgq2] {
        gap: 8px;
    }

    /* タブレット: トグルボタンを表示 */
    .algorithm-description-card__toggle[b-fafradsgq2] {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* PC: 折りたたみ状態に関わらずボディを常時表示 */
@media (min-width: 1280px) {
    .algorithm-description-card__body--hidden[b-fafradsgq2] {
        display: block;
    }
}

@media (max-width: 767px) {
    /* QuickAccessPanel は上段に配置 */
    .qap[b-fafradsgq2] {
        grid-row: auto;
        padding: 0;
    }

    .qap__content[b-fafradsgq2] {
        gap: 0;
    }

    /* スマホ: トグルボタンを表示 */
    .algorithm-description-card__toggle[b-fafradsgq2] {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
/* /Components/SeekBar.razor.rz.scp.css */
/* ─── SeekBar ─────────────────────────────────────────────────────────── */

.seek-bar[b-ce09n6lm8i] {
    display: flex;
    align-items: center;
    gap: 15px;
}

.seek-slider-container[b-ce09n6lm8i] {
    flex: 1;
    position: relative;
    height: 8px;
    background-color: #4A4A4A;
    border-radius: 4px;
    cursor: pointer;
    touch-action: none;
}

.seek-progress[b-ce09n6lm8i] {
    height: 100%;
    background-color: var(--color-accent);
    border-radius: 4px;
}

.seek-handle[b-ce09n6lm8i] {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: var(--color-accent);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    touch-action: none;
}

    .seek-handle:active[b-ce09n6lm8i] {
        cursor: grabbing;
    }

.time-display[b-ce09n6lm8i] {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.time-display--full[b-ce09n6lm8i] {
    white-space: pre; /* PadLeft のスペースを保持して幅を固定 */
}

.time-display--compact[b-ce09n6lm8i] {
    display: none;
    min-width: 6ch;
    text-align: right;
}

/* ─── スマホ ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .seek-bar[b-ce09n6lm8i] {
        padding: 6px 8px;
    }

    .time-display--full[b-ce09n6lm8i] {
        display: none;
    }

    .time-display--compact[b-ce09n6lm8i] {
        display: inline-block;
    }
}

/* ─── 完了マーカー ────────────────────────────────────────────────────── */

.seek-marker[b-ce09n6lm8i] {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 20px;
    border-radius: 2px;
    z-index: 3;
    cursor: default;
    pointer-events: auto;
}

    /* タップ領域を視覚幅より広く確保（::before で拡張） */
    .seek-marker[b-ce09n6lm8i]::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 32px;
        height: 32px;
    }

.seek-marker__badge[b-ce09n6lm8i] {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    padding: 1px 3px;
    border-radius: 3px;
    color: #111;
    white-space: nowrap;
    line-height: 1;
    font-weight: bold;
}
/* /Components/SettingsModal.razor.rz.scp.css */
/* ─── SettingsModal ────────────────────────────────────────────────────── */

@keyframes backdropFadeIn-b-u66o43ydqz {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes backdropFadeOut-b-u66o43ydqz {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes modalIn-b-u66o43ydqz {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes modalOut-b-u66o43ydqz {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to   { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
}

.settings-backdrop[b-u66o43ydqz] {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 300;
    animation: backdropFadeIn-b-u66o43ydqz 0.2s ease forwards;
}

.settings-backdrop--leaving[b-u66o43ydqz] {
    animation: backdropFadeOut-b-u66o43ydqz 0.2s ease forwards;
}

.settings-modal[b-u66o43ydqz] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    background: var(--bg-main);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 301;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn-b-u66o43ydqz 0.2s ease forwards;
}

.settings-modal--leaving[b-u66o43ydqz] {
    animation: modalOut-b-u66o43ydqz 0.2s ease forwards;
}

.settings-modal__header[b-u66o43ydqz] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 16px 20px;
    border-bottom: 1px solid #3A3A3A;
    flex-shrink: 0;
}

.settings-modal__title[b-u66o43ydqz] {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-light);
    flex: 1;
}

.settings-modal__close[b-u66o43ydqz] {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #aaa;
    font-size: 1.1rem;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

    .settings-modal__close:hover[b-u66o43ydqz] {
        color: #EF4444;
    }

.settings-modal__body[b-u66o43ydqz] {
    overflow-y: auto;
    padding: 8px 0 16px;
    flex: 1;
    overscroll-behavior: contain;
}

/* Settings セクション */
.settings-section[b-u66o43ydqz] {
    padding: 0 16px;
    margin-top: 4px;
}

.settings-section__title[b-u66o43ydqz] {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-gray);
    padding: 10px 0 6px;
}

.settings-section__body[b-u66o43ydqz] {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

/* 各行 */
.settings-row[b-u66o43ydqz] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    gap: 12px;
    border-bottom: 1px solid #2A2A2A;
}

    .settings-row:last-child[b-u66o43ydqz] {
        border-bottom: none;
    }

.settings-row--vertical[b-u66o43ydqz] {
    flex-direction: column;
    align-items: stretch;
}

.settings-row__inline[b-u66o43ydqz] {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-label[b-u66o43ydqz] {
    font-size: 0.9rem;
    color: var(--text-light);
}

.settings-value[b-u66o43ydqz] {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-light);
}

.settings-hint[b-u66o43ydqz] {
    font-size: 0.78rem;
    color: var(--text-gray);
    margin-top: 6px;
}

.settings-hint-inline[b-u66o43ydqz] {
    font-size: 0.8em;
    color: var(--text-gray);
}

.settings-warn[b-u66o43ydqz] {
    font-size: 0.8rem;
    color: #F59E0B;
    margin-top: 6px;
    display: block;
}

.settings-slider[b-u66o43ydqz] {
    width: 100%;
    margin-top: 8px;
    transition: background 0.1s linear;
}

/* Renderer セグメントコントロール */
.settings-segment[b-u66o43ydqz] {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #4A4A4A;
    margin-top: 8px;
    align-self: flex-start;
    width: 100%;
}

.settings-segment__btn[b-u66o43ydqz] {
    flex: 1;
    padding: 8px 12px;
    background: #2A2A2A;
    border: none;
    color: var(--text-gray);
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-right: 1px solid #4A4A4A;
    white-space: nowrap;
}

    .settings-segment__btn:last-child[b-u66o43ydqz] {
        border-right: none;
    }

    .settings-segment__btn:hover:not(.settings-segment__btn--active)[b-u66o43ydqz] {
        background: #3A3A3A;
        color: var(--text-light);
    }

.settings-segment__btn--active[b-u66o43ydqz] {
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
}

/* コンパクト幅セグメント（横並び行で使用） */
.settings-segment--fit[b-u66o43ydqz] {
    margin-top: 0;
    width: auto;
    min-width: 176px;
    flex-shrink: 0;
}

/* 言語選択ボタン */
.settings-segment__btn--lang[b-u66o43ydqz] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 14px;
    min-width: 68px;
}

.lang-flag[b-u66o43ydqz] {
    font-size: 1.2rem;
    line-height: 1;
}

.lang-name[b-u66o43ydqz] {
    font-size: 0.73rem;
}

/* Toggle Switch Styles */
.toggle-switch[b-u66o43ydqz] {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

    .toggle-switch input[type="checkbox"][b-u66o43ydqz] {
        display: none;
    }

.toggle-slider[b-u66o43ydqz] {
    position: relative;
    width: 48px;
    height: 26px;
    background-color: #4A4A4A;
    border-radius: 13px;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

    .toggle-slider[b-u66o43ydqz]::before {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background-color: var(--text-light);
        top: 3px;
        left: 3px;
        transition: transform 0.3s;
        box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

.toggle-switch input[type="checkbox"]:checked + .toggle-slider[b-u66o43ydqz] {
    background-color: var(--color-accent);
}

    .toggle-switch input[type="checkbox"]:checked + .toggle-slider[b-u66o43ydqz]::before {
        transform: translateX(22px);
    }

.toggle-switch:hover .toggle-slider[b-u66o43ydqz] {
    opacity: 0.9;
}

.toggle-label[b-u66o43ydqz] {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ─── WebGL Renderer コントロール ────────────────────────────────────── */
.webgl-control[b-u66o43ydqz] {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.webgl-info-btn[b-u66o43ydqz] {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #4A4A4A;
    background: transparent;
    color: var(--text-gray);
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}

    .webgl-info-btn:hover[b-u66o43ydqz],
    .webgl-info-btn--active[b-u66o43ydqz] {
        border-color: var(--color-accent);
        color: var(--color-accent);
    }

@keyframes hintFadeIn-b-u66o43ydqz {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

.settings-row--hint[b-u66o43ydqz] {
    padding-top: 2px;
    padding-bottom: 10px;
    border-bottom: none;
    animation: hintFadeIn-b-u66o43ydqz 0.15s ease forwards;
}

/* ─── スマホ: フルスクリーンモーダル ──────────────────────────────────── */
@keyframes modalInMobile-b-u66o43ydqz {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes modalOutMobile-b-u66o43ydqz {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(8px); }
}

/* ─── About セクション ──────────────────────────────────────────────── */
.about-content[b-u66o43ydqz] {
    padding: 0;
}

.about-item[b-u66o43ydqz] {
    padding: 14px 14px;
    border-bottom: 1px solid #2A2A2A;
}

    .about-item:last-child[b-u66o43ydqz] {
        border-bottom: none;
    }

.about-item__title[b-u66o43ydqz] {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0 0 6px 0;
}

.about-item__text[b-u66o43ydqz] {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-gray);
    margin: 0;
}

.about-link[b-u66o43ydqz] {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

    .about-link:hover[b-u66o43ydqz] {
        color: var(--color-accent-hover);
        text-decoration: underline;
    }

@media (max-width: 767px) {
    .settings-modal[b-u66o43ydqz] {
        top: 0;
        left: 0;
        transform: none;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        animation: modalInMobile-b-u66o43ydqz 0.2s ease forwards;
    }

    .settings-modal--leaving[b-u66o43ydqz] {
        animation: modalOutMobile-b-u66o43ydqz 0.2s ease forwards;
    }
}
/* /Components/ShareButton.razor.rz.scp.css */
.share-button-container[b-xtn7zsbi80] {
    position: relative;
    display: inline-block;
}

.share-popover[b-xtn7zsbi80] {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-main);
    border: 1px solid #3A3A3A;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    min-width: 200px;
    padding: 4px;
    z-index: 1000;
    animation: fadeIn-b-xtn7zsbi80 200ms ease-out;
}

@keyframes fadeIn-b-xtn7zsbi80 {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-option[b-xtn7zsbi80] {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: left;
}

.share-option:hover[b-xtn7zsbi80] {
    background: var(--bg-hover);
}

.share-option:focus-visible[b-xtn7zsbi80] {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.share-option__icon[b-xtn7zsbi80] {
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.share-option__icon svg[b-xtn7zsbi80] {
    width: 18px;
    height: 18px;
}

.share-option:hover .share-option__icon[b-xtn7zsbi80] {
    color: var(--color-accent);
}

.share-option__label[b-xtn7zsbi80] {
    flex: 1;
}
/* /Components/SortCard.razor.rz.scp.css */
/* ─── SortCard ────────────────────────────────────────────────────────── */

.sort-card[b-qc5te9417j] {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    border-radius: 8px;
    border: 2px solid #333;
    overflow: hidden;
    transition: border-color 0.3s;
    min-height: 0;
}

.sort-card--completed[b-qc5te9417j] {
    border-color: #10B981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.sort-card__header[b-qc5te9417j] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #252525;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.sort-card__algorithm-name[b-qc5te9417j] {
    font-size: 1em;
    color: #e0e0e0;
    font-weight: 600;
}

/* アルゴリズム選択 select（[Algo ▾] スタイル） */
.sort-card__algo-select[b-qc5te9417j] {
    font-size: 1em;
    font-weight: 600;
    color: #e0e0e0;
    background: transparent;
    border: none;
    border-bottom: 1px dashed #555;
    padding: 0 1.2em 0 0;
    cursor: pointer;
    appearance: auto;
    outline: none;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .sort-card__algo-select:hover[b-qc5te9417j] {
        border-bottom-color: #aaa;
        color: #fff;
    }

    .sort-card__algo-select option[b-qc5te9417j],
    .sort-card__algo-select optgroup[b-qc5te9417j] {
        background: #2a2a2a;
        color: #e0e0e0;
    }

.sort-card__header-right[b-qc5te9417j] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-card__visualization[b-qc5te9417j] {
    flex: 1;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sort-card__empty[b-qc5te9417j] {
    text-align: center;
    color: #999;
}

.sort-card__empty-icon[b-qc5te9417j] {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.complexity-badge[b-qc5te9417j] {
    font-size: 0.8em;
    color: #888;
    font-family: 'Courier New', monospace;
    background: #1e1e1e;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.btn-remove-grid[b-qc5te9417j] {
    padding: 0.25rem 0.5rem;
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
    min-width: 28px;
    opacity: 0.7;
}

    .btn-remove-grid:hover[b-qc5te9417j] {
        background: #DC2626;
        opacity: 1;
        transform: scale(1.1);
    }

    .btn-remove-grid:active[b-qc5te9417j] {
        transform: scale(0.95);
    }
/* /Components/SortCardGrid.razor.rz.scp.css */
/* ─── SortCardGrid と カルーセル ───────────────────────────────────────── */

.sort-card-grid-wrapper[b-zjjhhelmus] {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.sort-card-grid[b-zjjhhelmus] {
    display: grid;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 1rem;
    grid-auto-rows: 1fr;
    min-height: 0;
    flex: 1;
}

/* ドットインジケーター: PC/タブレット では非表示 */
.carousel-dots[b-zjjhhelmus] {
    display: none;
}

.carousel-dot[b-zjjhhelmus] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4A4A4A;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.carousel-dot--active[b-zjjhhelmus] {
    background: var(--color-accent);
    transform: scale(1.3);
}

/* ─── PC ──────────────────────────────────────────────────────────────── */
@media (min-width: 1280px) {
    .carousel-dots[b-zjjhhelmus] {
        display: none;
    }
}

/* ─── タブレット/モバイル ─────────────────────────────────────────────── */
@media (max-width: 1279px) {
    .sort-card-grid[b-zjjhhelmus] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ─── スマホ ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .sort-card-grid-wrapper[b-zjjhhelmus] {
        height: 100%;
        min-height: 400px;
    }

    .sort-card-grid[b-zjjhhelmus] {
        display: flex !important;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0 !important;
        padding: 8px 0 !important;
        grid-template-columns: unset !important;
        height: calc(100% - 28px);
    }

        .sort-card-grid[b-zjjhhelmus] >  * {
            flex: 0 0 calc(100vw - 80px);
            max-width: calc(100vw - 80px);
            scroll-snap-align: center;
            margin: 0 6px;
        }

    .sort-card-grid[b-zjjhhelmus] {
        grid-auto-rows: unset !important;
    }

    .carousel-dots[b-zjjhhelmus] {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 6px 0;
        flex-shrink: 0;
    }
}
/* /Components/SortStatsSummary.razor.rz.scp.css */
/* ====================================
   SortStatsSummary - Card-based Layout
   ==================================== */

.sort-stats-summary[b-8l7o0rcn3o] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card, #242a27);
    border-top: 1px solid var(--border-color, #374151);
}

/* ── コンパクト行（常時表示） ── */
.sss__compact[b-8l7o0rcn3o] {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    align-items: stretch;
}

/* ── 統計カード（各項目） ── */
.stat-mini[b-8l7o0rcn3o] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(127, 168, 111, 0.08);
    border: 1px solid rgba(127, 168, 111, 0.2);
    border-radius: 4px;
    min-height: 56px;
    min-width: 0;
    overflow: hidden;
    transition: background-color 0.15s ease;
}

.stat-mini:hover[b-8l7o0rcn3o] {
    background: rgba(127, 168, 111, 0.12);
}

.stat-mini .label[b-8l7o0rcn3o] {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    order: 2; /* 下に配置 */
}

.stat-mini .value[b-8l7o0rcn3o] {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #a0d68d; /* より鮮やかで読みやすい緑 */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    order: 1; /* 上に配置 */
}

/* 実行時間の内部要素 - ::deep で動的生成された要素にもスタイル適用 */
.stat-execution-time[b-8l7o0rcn3o]  .time-number {
    /* 数値部分は通常サイズのまま（親の color と font-size を継承） */
}

.stat-execution-time[b-8l7o0rcn3o]  .time-sep {
    margin: 0 0.2em; /* スラッシュ前後の小さなスペース */
    opacity: 0.7; /* 少し控えめに */
}

.stat-execution-time[b-8l7o0rcn3o]  .time-unit {
    font-size: 0.8em; /* 数値より小さく */
    opacity: 0.9; /* 少し控えめに */
    margin-left: 0.15em; /* 数値との間に小さなスペース */
}

/* ── サイズバリエーション ── */

/* Small: 省略形表示（比較4枚以上 / モバイル） */
.sort-stats-summary--small .sss__compact[b-8l7o0rcn3o] {
    gap: 4px;
}

.sort-stats-summary--small .stat-mini[b-8l7o0rcn3o] {
    padding: 4px 6px;
    gap: 2px;
    min-height: 48px;
}

.sort-stats-summary--small .stat-mini .label[b-8l7o0rcn3o] {
    font-size: 0.6rem;
}

.sort-stats-summary--small .stat-mini .value[b-8l7o0rcn3o] {
    font-size: 0.85rem;
}

/* Medium: 中間表示（比較2〜3枚 PC） */
.sort-stats-summary--medium .stat-mini[b-8l7o0rcn3o] {
    padding: 6px 8px;
    gap: 3px;
    min-height: 52px;
}

.sort-stats-summary--medium .stat-mini .label[b-8l7o0rcn3o] {
    font-size: 0.65rem;
}

.sort-stats-summary--medium .stat-mini .value[b-8l7o0rcn3o] {
    font-size: 0.9rem;
}

/* Full: フル表示（単一モード PC） */
.sort-stats-summary--full .sss__compact[b-8l7o0rcn3o] {
    grid-template-columns: repeat(6, 1fr);
}

.sort-stats-summary--full .stat-mini[b-8l7o0rcn3o] {
    gap: 5px;
    padding: 10px 12px;
    min-height: 60px;
}

.sort-stats-summary--full .stat-mini .label[b-8l7o0rcn3o] {
    font-size: 0.72rem;
}

.sort-stats-summary--full .stat-mini .value[b-8l7o0rcn3o] {
    font-size: 1.1rem;
}

/* ── レスポンシブ調整 ── */

/* タブレット（768px〜1279px） */
@media (max-width: 1279px) {
    .sort-stats-summary[b-8l7o0rcn3o] {
        padding: 6px 8px;
    }

    /* 4列 → 2列（2行表示）で高さを確保 */
    .sss__compact[b-8l7o0rcn3o] {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .sort-stats-summary--full .sss__compact[b-8l7o0rcn3o] {
        grid-template-columns: repeat(4, 1fr);
    }

    .stat-mini[b-8l7o0rcn3o] {
        padding: 6px 8px;
        gap: 3px;
        min-height: 50px;
    }

    .stat-mini .value[b-8l7o0rcn3o] {
        font-size: 0.9rem;
    }

    .stat-mini .label[b-8l7o0rcn3o] {
        font-size: 0.65rem;
    }
}

/* スマホ（〜767px） */
@media (max-width: 767px) {
    .sort-stats-summary[b-8l7o0rcn3o] {
        padding: 4px;
    }

    .sss__compact[b-8l7o0rcn3o] {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }

    .stat-mini[b-8l7o0rcn3o] {
        padding: 3px 3px;
        gap: 1px;
        min-height: 36px;
    }

    .stat-mini .label[b-8l7o0rcn3o] {
        font-size: 0.52rem;
        letter-spacing: 0.02em;
    }

    .stat-mini .value[b-8l7o0rcn3o] {
        font-size: 0.72rem;
    }
}
/* /Layout/MainLayout.razor.rz.scp.css */
.page[b-vu7aza9ege] {
    position: relative;
    display: flex;
    flex-direction: column;
}

main[b-vu7aza9ege] {
    flex: 1;
}

.sidebar[b-vu7aza9ege] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-vu7aza9ege] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-vu7aza9ege]  a, .top-row[b-vu7aza9ege]  .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

    .top-row[b-vu7aza9ege]  a:hover, .top-row[b-vu7aza9ege]  .btn-link:hover {
        text-decoration: underline;
    }

    .top-row[b-vu7aza9ege]  a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row[b-vu7aza9ege] {
        justify-content: space-between;
    }

    .top-row[b-vu7aza9ege]  a, .top-row[b-vu7aza9ege]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-vu7aza9ege] {
        flex-direction: row;
    }

    .sidebar[b-vu7aza9ege] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-vu7aza9ege] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth[b-vu7aza9ege]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-vu7aza9ege], article[b-vu7aza9ege] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}
/* /Layout/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-h0c2wqizel] {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-row[b-h0c2wqizel] {
    min-height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-h0c2wqizel] {
    font-size: 1.1rem;
}

.bi[b-h0c2wqizel] {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-house-door-fill-nav-menu[b-h0c2wqizel] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu[b-h0c2wqizel] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu[b-h0c2wqizel] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.nav-item[b-h0c2wqizel] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type[b-h0c2wqizel] {
        padding-top: 1rem;
    }

    .nav-item:last-of-type[b-h0c2wqizel] {
        padding-bottom: 1rem;
    }

    .nav-item[b-h0c2wqizel]  a {
        color: #d7d7d7;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
    }

.nav-item[b-h0c2wqizel]  a.active {
    background-color: rgba(255,255,255,0.37);
    color: white;
}

.nav-item[b-h0c2wqizel]  a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

@media (min-width: 641px) {
    .navbar-toggler[b-h0c2wqizel] {
        display: none;
    }

    .collapse[b-h0c2wqizel] {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }

    .nav-scrollable[b-h0c2wqizel] {
        /* Allow sidebar to scroll for tall menus */
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
/* /Pages/Index.razor.rz.scp.css */
/* ページ全体（グリッドレイアウト） */
.visualization-page[b-ow5eanfrpd] {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    gap: 10px;
    padding: 10px;
    background: var(--bg-main);
    color: var(--text-primary);
    width: 100%;
    max-width: var(--page-max-width);
    margin: 0 auto;
}

    /* ヘッダー（背景なし、直接載せる） */
    .visualization-page .header[b-ow5eanfrpd] {
        grid-column: 1 / -1;
        padding: 12px 8px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        position: relative;
    }

/* 左グループ（将来の拡張用） */
.header__left[b-ow5eanfrpd] {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* ページタイトルリンク */
.header__title-link[b-ow5eanfrpd] {
    text-decoration: none;
}

/* ページタイトル */
.header__title[b-ow5eanfrpd] {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient(#c8aa6e,#785a28);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 右グループ（アクションボタン）を右端に寄せる */
.header__actions[b-ow5eanfrpd] {
    margin-left: auto;
}

/* フッター（全幅） */
.visualization-page[b-ow5eanfrpd]  .site-footer {
    grid-column: 1 / -1;
    margin-top: 0;
}

/* 可視化エリア（メインエリア） */
.visualization-area[b-ow5eanfrpd] {
    grid-column: 2;
    grid-row: 2;
    background-color: var(--bg-panel);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    min-height: 0;
    position: relative;
}

.visualization-content[b-ow5eanfrpd] {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background-color: #1A1A1A;
    border-radius: 8px;
    overflow: hidden;
    min-height: 300px;
}

/* SeekBar / Stats ボタン 共有行 */
.seek-stats-row[b-ow5eanfrpd] {
    display: flex;
    align-items: center;
    min-height: 36px;
    gap: 10px;
}

.seek-stats-row[b-ow5eanfrpd]  .seek-bar {
    flex: 1;
}

.stats-icon-btn svg[b-ow5eanfrpd] {
    width: 28px;
    height: 28px;
}

.stats-icon-btn[b-ow5eanfrpd] {
    border-color: rgba(200, 170, 110, 0.45);
    animation: stats-glow-pulse-b-ow5eanfrpd 2s ease-in-out infinite;
}

    .stats-icon-btn:hover[b-ow5eanfrpd] {
        background: rgba(200, 170, 110, 0.12);
        border-color: #c8aa6e;
        transform: translateY(-1px);
    }

    .stats-icon-btn:disabled[b-ow5eanfrpd] {
        opacity: 0.3;
        cursor: not-allowed;
        animation: none;
        box-shadow: none;
        border-color: var(--border-color);
    }

@keyframes stats-glow-pulse-b-ow5eanfrpd {
    0%, 100% {
        box-shadow: 0 0 5px rgba(200, 170, 110, 0.35);
    }
    50% {
        box-shadow: 0 0 12px rgba(200, 170, 110, 0.65), 0 0 4px rgba(200, 170, 110, 0.4);
    }
}

/* タブレット/モバイル: カードパネルを上段に、メインエリアを下段にシフト */
@media (max-width: 1279px) {
    .visualization-page[b-ow5eanfrpd] {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
    }

    .visualization-area[b-ow5eanfrpd] {
        grid-column: 1;
        grid-row: 3;
    }
}

/* タブレット (768px〜1279px) */
@media (min-width: 768px) and (max-width: 1279px) {
    .visualization-page[b-ow5eanfrpd] {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }

    .visualization-area[b-ow5eanfrpd] {
        overflow-y: visible;
        height: auto;
    }

    .header[b-ow5eanfrpd] {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }

    .header__title[b-ow5eanfrpd] {
        font-size: 1.75rem;
    }
}

/* スマホ (〜767px) */
@media (max-width: 767px) {
    .visualization-page[b-ow5eanfrpd] {
        height: auto;
        min-height: 100vh;
    }

    .visualization-area[b-ow5eanfrpd] {
        min-height: 600px;
    }

    .visualization-content[b-ow5eanfrpd] {
        min-height: 400px;
    }

    .header__title[b-ow5eanfrpd] {
        font-size: 1.2rem;
    }
}
/* /Pages/TutorialPage.razor.rz.scp.css */
/* ページ全体（グリッドレイアウト） */
.tutorial-page:focus[b-wvnp3qo1sm],
.tutorial-page:focus-visible[b-wvnp3qo1sm] {
    outline: none;
}

.tutorial-page[b-wvnp3qo1sm] {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    gap: 10px;
    padding: 10px;
    background: var(--bg-main);
    color: var(--text-primary);
    width: 100%;
    max-width: var(--page-max-width);
    margin: 0 auto;
}

    /* ヘッダー（背景なし、直接載せる） */
    .tutorial-page .header[b-wvnp3qo1sm] {
        grid-column: 1 / -1;
        padding: 12px 8px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        position: relative;
    }

/* フッター（全幅） */
.tutorial-page[b-wvnp3qo1sm]  .site-footer {
    grid-column: 1 / -1;
    margin-top: 0;
}


/* 閉じるボタン（Settingsモーダルと同じスタイル） */
.tutorial-close-btn[b-wvnp3qo1sm] {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #aaa;
    font-size: 1.1rem;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

    .tutorial-close-btn:hover[b-wvnp3qo1sm] {
        color: #EF4444;
    }

/* 右端に閉じるボタンを寄せる */
.header__actions[b-wvnp3qo1sm] {
    margin-left: auto;
}

.tutorial__title[b-wvnp3qo1sm] {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient(#c8aa6e,#785a28);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tutorial__title__algo[b-wvnp3qo1sm] {
    font-weight: 400;
    color: var(--text-secondary);
}

.tutorial-try-btn[b-wvnp3qo1sm] {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #5a9a4d 0%, #3d7a38 100%);
    color: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}

    .tutorial-try-btn:hover[b-wvnp3qo1sm] {
        background: linear-gradient(135deg, #6bb05d 0%, #4a8c43 100%);
        opacity: 1;
    }

.tutorial-source-btn[b-wvnp3qo1sm] {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.625rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color, #444);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

    .tutorial-source-btn:hover[b-wvnp3qo1sm] {
        color: var(--text-primary);
        border-color: var(--text-secondary);
    }

/* --- Cards Panel (PC: left sidebar) ---------------------------------- */
.tutorial-cards-panel[b-wvnp3qo1sm] {
    grid-column: 1;
    grid-row: 2;
    background-color: var(--bg-panel);
    border-radius: 8px;
    overflow-y: auto;
    padding: 16px;
}

    .tutorial-cards-panel .controls-fieldset[b-wvnp3qo1sm] {
        display: flex;
        flex-direction: column;
        gap: 8px;
        border: none;
        margin: 0;
        padding: 0;
    }


/* ─── メインエリア（visualization-area 相当） ────────────────── */
.tutorial-main-area[b-wvnp3qo1sm] {
    grid-column: 2;
    grid-row: 2;
    background-color: var(--bg-panel);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    min-height: 0;
    position: relative;
}

/* ─── 再生コントロールバー（PlayControlBar 相当） ────────────────────── */
.tutorial-play-control-bar[b-wvnp3qo1sm] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    flex-shrink: 0;
    position: relative; /* keyboard-hint の absolute positioning の基準 */
}

/* PC のみ表示（モバイル・タブレットにはキーボードがないため非表示） */
.tutorial-keyboard-hint[b-wvnp3qo1sm] {
    display: none;
    position: absolute;
    right: 0;
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    pointer-events: none;
}

@media (min-width: 1280px) {
    .tutorial-keyboard-hint[b-wvnp3qo1sm] {
        display: block;
    }
}

.ctrl-step-counter[b-wvnp3qo1sm] {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
}

.ctrl-buttons[b-wvnp3qo1sm] {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Tutorial ボタン: メイン PlayControlBar と同サイズ・スタイル */
.ctrl-btn[b-wvnp3qo1sm] {
    height: 60px;
    min-width: 70px;
    padding: 0;
    border: 2px solid;
    border-radius: 8px;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s, opacity 0.15s;
    background: rgba(127, 168, 111, 0.2); /* モスグリーン半透明 */
    color: #91bd7e;
    border-color: rgba(127, 168, 111, 0.5);
}

    .ctrl-btn svg[b-wvnp3qo1sm] {
        width: 28px;
        height: 28px;
        display: block;
    }

    .ctrl-btn:hover:not(:disabled)[b-wvnp3qo1sm] {
        background: rgba(127, 168, 111, 0.35);
        border-color: var(--color-accent);
    }

    .ctrl-btn:active:not(:disabled)[b-wvnp3qo1sm] {
        background: rgba(127, 168, 111, 0.5);
        border-color: var(--color-accent-darker);
    }

    .ctrl-btn:disabled[b-wvnp3qo1sm] {
        opacity: 0.35;
        cursor: not-allowed;
    }

/* Play/Pause ボタン: 青系で強調 */
.ctrl-play[b-wvnp3qo1sm] {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.5);
    min-width: 80px; /* 少しだけ幅を広げる */
}

    .ctrl-play:hover:not(:disabled)[b-wvnp3qo1sm] {
        background: rgba(59, 130, 246, 0.35);
        border-color: #3b82f6;
    }

    .ctrl-play:active:not(:disabled)[b-wvnp3qo1sm] {
        background: rgba(59, 130, 246, 0.5);
        border-color: #2563eb;
    }



/* ─── ローディング・空状態 ─────────────────────────────────────────────── */
.tutorial-loading[b-wvnp3qo1sm] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.loading-spinner[b-wvnp3qo1sm] {
    animation: spin-b-wvnp3qo1sm 1s linear infinite;
    display: inline-block;
}

@keyframes spin-b-wvnp3qo1sm {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.tutorial-empty[b-wvnp3qo1sm] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    text-align: center;
}

.empty-icon[b-wvnp3qo1sm] {
    font-size: 3rem;
}

.empty-text[b-wvnp3qo1sm] {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.empty-hint[b-wvnp3qo1sm] {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 480px;
}

/* ─── アルゴリズム説明パネル ───────────────────────────────────────────── */
.tutorial-description-panel[b-wvnp3qo1sm] {
    background: linear-gradient(135deg, var(--color-tutorial-bg-start) 0%, var(--color-tutorial-bg-end) 100%);
    border: 1px solid rgba(142, 192, 124, 0.3);
    border-left: 4px solid var(--color-tutorial-accent);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(142, 192, 124, 0.1);
    flex-shrink: 0;
}

.tdp-header[b-wvnp3qo1sm] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tdp-header__left[b-wvnp3qo1sm] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tdp-header__right[b-wvnp3qo1sm] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desc-name[b-wvnp3qo1sm] {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-tutorial-accent);
}

.desc-meta[b-wvnp3qo1sm] {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.desc-badge[b-wvnp3qo1sm] {
    background: rgba(142, 192, 124, 0.15);
    color: var(--color-tutorial-accent);
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
    border: 1px solid rgba(142, 192, 124, 0.3);
}

.tdp-body[b-wvnp3qo1sm] {
    padding-top: 0.25rem;
}

.desc-body[b-wvnp3qo1sm] {
    color: var(--color-tutorial-text);
    font-size: 0.88rem;
    line-height: 1.6;
}

    .desc-body[b-wvnp3qo1sm]  p {
        margin: 0 0 0.5rem 0;
    }

        .desc-body[b-wvnp3qo1sm]  p:last-child {
            margin-bottom: 0;
        }

    .desc-body[b-wvnp3qo1sm]  strong {
        color: var(--color-tutorial-accent);
        font-weight: 600;
    }

    .desc-body[b-wvnp3qo1sm]  ul {
        margin: 0.125rem 0 0.5rem 1.25rem;
        padding: 0;
        list-style: disc;
    }

    .desc-body[b-wvnp3qo1sm]  li {
        margin-bottom: 0.25rem;
    }

/* 折りたたみトグル: PC/タブレット では非表示 */
.tdp-toggle[b-wvnp3qo1sm] {
    display: none;
    background: rgba(142, 192, 124, 0.15);
    border: 1px solid rgba(142, 192, 124, 0.3);
    border-radius: 4px;
    color: var(--color-tutorial-accent);
    font-size: 0.7rem;
    padding: 3px 7px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

    .tdp-toggle:hover[b-wvnp3qo1sm] {
        background: rgba(142, 192, 124, 0.25);
        border-color: var(--color-tutorial-accent);
    }

/* モバイル: 説明本文を折りたたみ */
.tdp-body--hidden[b-wvnp3qo1sm] {
    display: none;
}

/* ─── ナラティブパネル ─────────────────────────────────────────────────── */
.tutorial-narrative-panel[b-wvnp3qo1sm] {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* フェーズバー */
.phase-bar[b-wvnp3qo1sm] {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary, #9CA3AF);
    background: var(--bg-surface, #2A2A2A);
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    letter-spacing: 0.01em;
}

.tutorial-narrative-panel .narrative-row[b-wvnp3qo1sm] {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.narrative-badge[b-wvnp3qo1sm] {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    white-space: nowrap;
    align-self: center;
    min-width: 86px;
    text-align: center;
    flex-shrink: 0;
}

.narrative-text[b-wvnp3qo1sm] {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

/* ─── 表示切替トグル ───────────────────────────────────────────────────── */
.tutorial-view-toggle[b-wvnp3qo1sm] {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 2px;
    align-self: center;
    flex-shrink: 0;
}

.toggle-btn[b-wvnp3qo1sm] {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

    .toggle-btn svg[b-wvnp3qo1sm] {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .toggle-btn:hover:not(.toggle-btn--active)[b-wvnp3qo1sm] {
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-primary);
    }

.toggle-btn--active[b-wvnp3qo1sm] {
    background: rgba(142, 192, 124, 0.15);
    color: var(--color-tutorial-accent);
    border-color: rgba(142, 192, 124, 0.3);
}

/* ─── マーブルエリア ───────────────────────────────────────────────────── */
.tutorial-marble-area[b-wvnp3qo1sm] {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    align-items: center;
    overflow-x: auto;
    flex: 1;
    min-height: 150px;
}

/* ─── HeapTreeRenderer スコープ外から指定するスタイル ──────────────────── */
[b-wvnp3qo1sm] .heap-tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

[b-wvnp3qo1sm] .heap-tree-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[b-wvnp3qo1sm] .heap-tree-svg {
    width: 100%;
    max-width: 640px;
    height: auto;
}

[b-wvnp3qo1sm] .heap-node {
    transition: opacity 0.25s ease;
}

[b-wvnp3qo1sm] .heap-node--highlighted circle {
    animation: heap-node-pop-b-wvnp3qo1sm 0.3s ease;
}

@keyframes heap-node-pop-b-wvnp3qo1sm {
    0% { transform-origin: center; r: 21; }
    50% { r: 25; }
    100% { r: 21; }
}

[b-wvnp3qo1sm] .heap-tree-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 2rem;
    text-align: center;
}

[b-wvnp3qo1sm] .heap-sorted-region {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    flex-wrap: wrap;
}

[b-wvnp3qo1sm] .heap-sorted-label {
    font-size: 0.72rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

[b-wvnp3qo1sm] .heap-sorted-values {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

[b-wvnp3qo1sm] .heap-sorted-marble {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    opacity: 0.7;
}

/* ─── BstTreeRenderer スコープ外から指定するスタイル ────────────────────── */
[b-wvnp3qo1sm] .bst-tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

[b-wvnp3qo1sm] .bst-tree-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[b-wvnp3qo1sm] .bst-tree-svg {
    width: 100%;
    max-width: 760px;
    height: auto;
}

[b-wvnp3qo1sm] .bst-node {
    transition: opacity 0.2s ease;
}

[b-wvnp3qo1sm] .bst-node--highlighted circle:nth-child(2) {
    animation: bst-node-pop-b-wvnp3qo1sm 0.3s ease;
}

@keyframes bst-node-pop-b-wvnp3qo1sm {
    0%   { transform-box: fill-box; transform-origin: center; transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

[b-wvnp3qo1sm] .bst-tree-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 2rem;
    text-align: center;
}

[b-wvnp3qo1sm] .bst-phase-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

[b-wvnp3qo1sm] .bst-phase-badge--build {
    background: rgba(251, 191, 36, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

[b-wvnp3qo1sm] .bst-phase-badge--traversal {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* ─── RecursionTreeRenderer ─────────────────────────────────────────── */
[b-wvnp3qo1sm] .recursion-tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

[b-wvnp3qo1sm] .recursion-tree-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[b-wvnp3qo1sm] .recursion-tree-svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: visible;
}

[b-wvnp3qo1sm] .recursion-node {
    transition: opacity 0.2s ease;
}

[b-wvnp3qo1sm] .recursion-node--active rect:nth-child(2) {
    animation: recursion-node-pop-b-wvnp3qo1sm 0.3s ease;
}

@keyframes recursion-node-pop-b-wvnp3qo1sm {
    0%   { transform-box: fill-box; transform-origin: center; transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

[b-wvnp3qo1sm] .recursion-tree-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 2rem;
    text-align: center;
}

/* ─── MarbleRenderer スコープ外から指定するスタイル ───────────────────── */
[b-wvnp3qo1sm] .marble-row-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

[b-wvnp3qo1sm] .marble-row-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[b-wvnp3qo1sm] .marble-row-content {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
}

[b-wvnp3qo1sm] .marble-arrow-area {
    height: 56px;
    width: 100%;
}

[b-wvnp3qo1sm] .marble-swap-arrows {
    display: block;
    width: 100%;
    height: 100%;
    animation: arrow-fade-in-b-wvnp3qo1sm 0.3s ease;
}

[b-wvnp3qo1sm] .marble-compare-symbol {
    display: block;
    width: 100%;
    height: 100%;
    animation: arrow-fade-in-b-wvnp3qo1sm 0.3s ease;
}

[b-wvnp3qo1sm] .marble-write-arrow {
    display: block;
    width: 100%;
    height: 100%;
    animation: arrow-fade-in-b-wvnp3qo1sm 0.3s ease;
}

[b-wvnp3qo1sm] .marble-role-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: #000;
    padding: 0.1rem 0.35rem;
    border-radius: 9999px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    line-height: 1.4;
    animation: arrow-fade-in-b-wvnp3qo1sm 0.25s ease;
    align-self: center;
    cursor: help;
}

[b-wvnp3qo1sm] .marble-role-badge-wrapper {
    position: relative;
    display: inline-flex;
    align-self: center;
}

[b-wvnp3qo1sm] .marble-role-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[b-wvnp3qo1sm] .marble-role-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

[b-wvnp3qo1sm] .marble-role-badge-wrapper:hover .marble-role-tooltip {
    opacity: 1;
    visibility: visible;
}

@media (hover: none) and (pointer: coarse) {
    [b-wvnp3qo1sm] .marble-role-badge:active ~ .marble-role-tooltip {
        opacity: 1;
        visibility: visible;
    }
}


[b-wvnp3qo1sm] .marble-ghost {
    font-size: 0.8rem;
    font-weight: 600;
    color: #FB923C;
    opacity: 1;
    white-space: nowrap;
    font-family: monospace;
    letter-spacing: 0.02em;
    animation: arrow-fade-in-b-wvnp3qo1sm 0.3s ease;
}

@keyframes arrow-fade-in-b-wvnp3qo1sm {
    from { opacity: 0; }
    to   { opacity: 1; }
}

[b-wvnp3qo1sm] .marble-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    --marble-slot-width: calc(56px + 0.75rem);
}

[b-wvnp3qo1sm] .marble-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    position: relative;
    top: 0;
    transition: top 0.25s ease;
}

[b-wvnp3qo1sm] .marble-slot--lifted {
    top: -20px;
}

[b-wvnp3qo1sm] .marble-swapping {
    animation: marble-slide-b-wvnp3qo1sm 0.4s ease-out;
}

@keyframes marble-slide-b-wvnp3qo1sm {
    from { transform: translateX(calc(var(--slide-offset) * var(--marble-slot-width))); }
    to   { transform: translateX(0); }
}

[b-wvnp3qo1sm] .marble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.15);
    border: 3px solid transparent;
}

/* ─── 操作タイプ別アウトライン（リング） ──────────────────────────────── */
[b-wvnp3qo1sm] .marble-outline-compare {
    border-color: #A855F7;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.7), 0 0 12px rgba(168, 85, 247, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transform: scale(1.15);
    animation: marble-pop-b-wvnp3qo1sm 0.3s ease;
}

[b-wvnp3qo1sm] .marble-outline-swap {
    border-color: #EF4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.7), 0 0 12px rgba(239, 68, 68, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transform: scale(1.15);
    animation: marble-pop-b-wvnp3qo1sm 0.3s ease;
}

[b-wvnp3qo1sm] .marble-outline-indexread {
    border-color: #FBBF24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.7), 0 0 12px rgba(251, 191, 36, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transform: scale(1.15);
    animation: marble-pop-b-wvnp3qo1sm 0.3s ease;
}

[b-wvnp3qo1sm] .marble-outline-indexwrite {
    border-color: #FB923C;
    border-width: 4px;
    box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.75), 0 0 18px rgba(249, 115, 22, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transform: scale(1.2);
    animation: marble-write-pop-b-wvnp3qo1sm 0.4s ease;
}

[b-wvnp3qo1sm] .marble-outline-rangecopy {
    border-color: #F97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.7), 0 0 12px rgba(249, 115, 22, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transform: scale(1.15);
    animation: marble-pop-b-wvnp3qo1sm 0.3s ease;
}

/* ─── DistributionBucketRenderer スコープ外から指定するスタイル ──────────── */
[b-wvnp3qo1sm] .dist-bucket-view {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

[b-wvnp3qo1sm] .dist-label-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[b-wvnp3qo1sm] .dist-row-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[b-wvnp3qo1sm] .dist-phase-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    text-transform: capitalize;
}

[b-wvnp3qo1sm] .dist-phase-scatter {
    background: rgba(251, 191, 36, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

[b-wvnp3qo1sm] .dist-phase-gather {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
    border: 1px solid rgba(249, 115, 22, 0.35);
}

[b-wvnp3qo1sm] .dist-pass-label {
    font-weight: 400;
    opacity: 0.8;
}

[b-wvnp3qo1sm] .dist-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 2rem;
    text-align: center;
}

[b-wvnp3qo1sm] .dist-buckets {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.25rem 0.5rem;
}

[b-wvnp3qo1sm] .dist-bucket {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

[b-wvnp3qo1sm] .dist-bucket-body {
    display: flex;
    flex-direction: column-reverse; /* 最後に追加した要素が上（天辺）に来る */
    align-items: center;
    gap: 3px;
    min-height: 56px;            /* 空バケット時も枠を確保 */
    width: 50px;
    padding: 4px 3px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

/* Scatter アクティブバケット: amber */
[b-wvnp3qo1sm] .dist-bucket--scatter .dist-bucket-body {
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(251, 191, 36, 0.06);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

/* Gather アクティブバケット: orange */
[b-wvnp3qo1sm] .dist-bucket--gather .dist-bucket-body {
    border-color: rgba(249, 115, 22, 0.55);
    background: rgba(249, 115, 22, 0.06);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}

[b-wvnp3qo1sm] .dist-bucket-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    min-width: 20px;
    font-family: monospace;
}

[b-wvnp3qo1sm] .dist-bucket--active .dist-bucket-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* ─── Counting sort ヒストグラム表示 ────────────────────────────────── */
[b-wvnp3qo1sm] .dist-histogram {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.5rem;
    min-height: 150px;
}

[b-wvnp3qo1sm] .dist-histogram-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

[b-wvnp3qo1sm] .dist-histogram-bar {
    width: 36px;
    min-height: 8px;
    background: linear-gradient(180deg, rgba(142, 192, 124, 0.6) 0%, rgba(142, 192, 124, 0.35) 100%);
    border: 1.5px solid rgba(142, 192, 124, 0.4);
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[b-wvnp3qo1sm] .dist-histogram-bar--active {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.75) 0%, rgba(251, 191, 36, 0.5) 100%);
    border-color: rgba(251, 191, 36, 0.7);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

[b-wvnp3qo1sm] .dist-histogram-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[b-wvnp3qo1sm] .dist-histogram-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    min-width: 20px;
    font-family: monospace;
}

[b-wvnp3qo1sm] .dist-marble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    border: 2.5px solid transparent;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Scatter でアクティブなマーブル: amber ハイライト */
[b-wvnp3qo1sm] .dist-marble--scatter {
    border-color: #FBBF24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.5), 0 0 10px rgba(251, 191, 36, 0.35);
    transform: scale(1.1);
}

/* Gather でアクティブなマーブル: orange ハイライト */
[b-wvnp3qo1sm] .dist-marble--gather {
    border-color: #F97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.5), 0 0 10px rgba(249, 115, 22, 0.35);
    transform: scale(1.1);
}

[b-wvnp3qo1sm] .dist-pass-index {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    padding: 0.15rem 0.45rem;
}

[b-wvnp3qo1sm] .dist-range-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 9999px;
    padding: 0.15rem 0.45rem;
}

/* ─── NetworkDiagramRenderer スコープ外から指定するスタイル ──────────────── */
[b-wvnp3qo1sm] .network-diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

[b-wvnp3qo1sm] .network-diagram-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[b-wvnp3qo1sm] .network-diagram-svg {
    width: 100%;
    max-width: 1200px;
    height: auto;
    min-height: 400px;
}

[b-wvnp3qo1sm] .network-diagram-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 2rem;
    text-align: center;
}


@keyframes marble-pop-b-wvnp3qo1sm {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1.15);
    }
}

@keyframes marble-pop-sm-b-wvnp3qo1sm {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1.1);
    }
}

@keyframes marble-write-pop-b-wvnp3qo1sm {
    0%   { transform: scale(1);    box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
    25%  { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.8), 0 0 24px rgba(249, 115, 22, 0.6); }
    60%  { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.6); }
    80%  { transform: scale(1.22); }
    100% { transform: scale(1.2);  box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.75), 0 0 18px rgba(249, 115, 22, 0.5); }
}

[b-wvnp3qo1sm] .marble-index {
    font-size: 0.68rem;
    color: var(--text-gray);
    font-family: monospace;
}

/* ─── Shell sort gap 部分列カラードット ────────────────────────────────── */
[b-wvnp3qo1sm] .marble-gap-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 auto;
    opacity: 0.9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    animation: gap-dot-fade-in-b-wvnp3qo1sm 0.25s ease;
}

@keyframes gap-dot-fade-in-b-wvnp3qo1sm {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 0.9; transform: scale(1); }
}

/* PC: サイドバー幅を考慮してタイトルを右側エリアの中央に配置 */
@media (min-width: 1280px) {
    .tutorial__title[b-wvnp3qo1sm] {
        left: calc(280px + (100% - 280px) / 2);
    }
}

/* PC: 折りたたみ状態でも常に表示 */
@media (min-width: 1280px) {
    .tdp-body--hidden[b-wvnp3qo1sm] {
        display: block;
    }
}

/* タブレット/モバイル: カードパネルを上段に、メインエリアを下段にシフト */
@media (max-width: 1279px) {
    .tutorial-page[b-wvnp3qo1sm] {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
    }

    .tutorial-cards-panel[b-wvnp3qo1sm] {
        grid-column: 1;
        grid-row: 2;
        background-color: transparent;
        padding: 0;
        border-radius: 0;
        overflow-y: visible;
    }

    .tutorial-main-area[b-wvnp3qo1sm] {
        grid-column: 1;
        grid-row: 3;
    }
}

/* ─── タブレット (768px〜1279px) ────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1279px) {
    /* ページ全体をスクロール可能にする */
    .tutorial-page[b-wvnp3qo1sm] {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }

    .tutorial-cards-panel[b-wvnp3qo1sm] {
        grid-row: auto;
        padding: 0 10px;
    }

    .tutorial-main-area[b-wvnp3qo1sm] {
        grid-row: auto;
        overflow-y: visible;
        height: auto;
    }

    /* マーブルエリアを内容に合わせて拡張し、ページ全体でスクロール */
    .tutorial-marble-area[b-wvnp3qo1sm] {
        flex: none;
        min-height: auto;
        overflow-x: auto;
        overflow-y: visible;
    }

    .tutorial-header[b-wvnp3qo1sm] {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }

    .tutorial__title[b-wvnp3qo1sm] {
        font-size: 1.75rem;
    }

    .tutorial__title__algo[b-wvnp3qo1sm] {
        display: none;
    }

    .tutorial-try-btn[b-wvnp3qo1sm] {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .tutorial-toolbar[b-wvnp3qo1sm] {
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .algo-select[b-wvnp3qo1sm] {
        min-width: 180px;
    }

    .ctrl-btn[b-wvnp3qo1sm] {
        height: 40px;
        min-width: 50px;
        font-size: 1.0rem;
    }

    .ctrl-play[b-wvnp3qo1sm] {
        height: 40px;
        min-width: 100px;
        font-size: 1.1rem;
    }

    .ctrl-speed input[type="range"][b-wvnp3qo1sm] {
        width: 70px;
    }

    .tutorial-description-panel[b-wvnp3qo1sm],
    .tutorial-narrative-panel[b-wvnp3qo1sm],
    .tutorial-marble-area[b-wvnp3qo1sm] {
        border-radius: 6px;
    }

    /* タブレット: 説明折りたたみトグルを表示 */
    .tdp-toggle[b-wvnp3qo1sm] {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Compare文は3行になり得るため min-height で高さを確保してマーブルのズレを防ぐ */
    .tutorial-narrative-panel[b-wvnp3qo1sm] {
        min-height: 6.5rem;
    }

    [b-wvnp3qo1sm] .marble-arrow-area {
        height: 42px;
    }

    [b-wvnp3qo1sm] .marble {
        width: 48px;
        height: 48px;
        font-size: 1.05rem;
        border-width: 2px;
    }

    [b-wvnp3qo1sm] .marble-row {
        gap: 0.5rem;
        --marble-slot-width: calc(48px + 0.5rem);
    }

    [b-wvnp3qo1sm] .marble-index {
        font-size: 0.6rem;
    }

    [b-wvnp3qo1sm] .marble-slot--lifted {
        top: -14px;
    }

    /* タブレット: scale を控えめにして重なりを防ぐ */
    [b-wvnp3qo1sm] .marble-outline-compare,
    [b-wvnp3qo1sm] .marble-outline-swap,
    [b-wvnp3qo1sm] .marble-outline-indexread,
    [b-wvnp3qo1sm] .marble-outline-rangecopy {
        transform: scale(1.1);
        animation: marble-pop-sm-b-wvnp3qo1sm 0.25s ease;
    }

    [b-wvnp3qo1sm] .marble-outline-indexwrite {
        border-width: 3px;
        transform: scale(1.15);
        animation: marble-write-pop-b-wvnp3qo1sm 0.4s ease;
    }

    [b-wvnp3qo1sm] .marble-ghost {
        font-size: 0.65rem;
    }

    [b-wvnp3qo1sm] .marble-role-badge {
        font-size: 0.55rem;
        padding: 0.08rem 0.28rem;
    }

    [b-wvnp3qo1sm] .heap-sorted-marble {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    /* タブレット: dist-bucket を少し小さく */
    [b-wvnp3qo1sm] .dist-bucket-body {
        width: 44px;
        min-height: 50px;
    }

    [b-wvnp3qo1sm] .dist-marble {
        width: 36px;
        height: 36px;
        font-size: 0.82rem;
    }

    [b-wvnp3qo1sm] .dist-buckets {
        gap: 4px;
    }

    [b-wvnp3qo1sm] .dist-histogram-bar {
        width: 30px;
    }

    .tutorial-cards-panel .controls-fieldset[b-wvnp3qo1sm] {
        gap: 8px;
    }

    .tutorial-cards-panel input[type="range"][b-wvnp3qo1sm] {
        width: 100%;
    }
}

/* ─── スマホ (~767px) ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* ページ全体をスクロール可能にする */
    .tutorial-page[b-wvnp3qo1sm] {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }

    .tutorial-cards-panel[b-wvnp3qo1sm] {
        grid-row: auto;
        padding: 0 10px;
    }

    .tutorial-main-area[b-wvnp3qo1sm] {
        grid-row: auto;
        overflow-y: visible;
        height: auto;
    }

    /* マーブルエリアを内容に合わせて拡張し、ページ全体でスクロール */
    .tutorial-marble-area[b-wvnp3qo1sm] {
        flex: none;
        min-height: auto;
        overflow-x: auto;
        overflow-y: visible;
    }

    .tutorial-header[b-wvnp3qo1sm] {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }

    .tutorial__title[b-wvnp3qo1sm] {
        font-size: 1.2rem;
    }

    .tutorial__title__algo[b-wvnp3qo1sm] {
        display: none;
    }

    .tutorial-try-btn[b-wvnp3qo1sm] {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .tutorial-toolbar[b-wvnp3qo1sm] {
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .algo-select[b-wvnp3qo1sm] {
        min-width: 140px;
        font-size: 0.9rem;
    }

    /* ボタンをコンテナ幅に比例分配 */
    .ctrl-buttons[b-wvnp3qo1sm] {
        width: 100%;
    }

    .ctrl-btn[b-wvnp3qo1sm] {
        height: 40px;
        flex: 1;
        min-width: 0;
        font-size: 1.0rem;
    }

    .ctrl-play[b-wvnp3qo1sm] {
        height: 40px;
        flex: 1.5; /* Play/Pause は他のボタンより 1.5 倍幅 */
        min-width: 0;
        font-size: 1.1rem;
    }

    .ctrl-speed input[type="range"][b-wvnp3qo1sm] {
        width: 70px;
    }

    .tutorial-description-panel[b-wvnp3qo1sm],
    .tutorial-narrative-panel[b-wvnp3qo1sm],
    .tutorial-marble-area[b-wvnp3qo1sm] {
        border-radius: 6px;
    }

    /* Compare文は3行になり得るため min-height で高さを確保してマーブルのズレを防ぐ */
    /* phase-bar あり + 3行テキストで ~8.2rem 必要なため余裕をもって 9rem に設定 */
    .tutorial-narrative-panel[b-wvnp3qo1sm] {
        min-height: 9rem;
    }

    /* 矢印SVGはシングル行前提の座標計算のため、複数行レイアウトでは非表示 */
    [b-wvnp3qo1sm] .marble-arrow-area {
        display: none;
    }

    /* inline-flex だと折り返し時に幅が循環参照になるため flex + width:100% で解消 */
    [b-wvnp3qo1sm] .marble-row-content {
        display: flex;
        width: 100%;
    }

    [b-wvnp3qo1sm] .marble {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        border-width: 2px;
    }

    [b-wvnp3qo1sm] .marble-row {
        gap: 0.375rem;
        /* flex-wrap: wrap はベースCSSから継承 */
        --marble-slot-width: calc(36px + 0.375rem);
    }

    [b-wvnp3qo1sm] .marble-index {
        font-size: 0.6rem;
    }

    [b-wvnp3qo1sm] .marble-slot--lifted {
        top: -10px;
    }

    /* スマホ: scale を控えめにして重なりを防ぐ */
    [b-wvnp3qo1sm] .marble-outline-compare,
    [b-wvnp3qo1sm] .marble-outline-swap,
    [b-wvnp3qo1sm] .marble-outline-indexread,
    [b-wvnp3qo1sm] .marble-outline-rangecopy {
        transform: scale(1.1);
        animation: marble-pop-sm-b-wvnp3qo1sm 0.25s ease;
    }

    [b-wvnp3qo1sm] .marble-outline-indexwrite {
        border-width: 3px;
        transform: scale(1.12);
        animation: marble-write-pop-b-wvnp3qo1sm 0.4s ease;
    }

    [b-wvnp3qo1sm] .marble-ghost {
        font-size: 0.6rem;
    }

    [b-wvnp3qo1sm] .marble-role-badge {
        font-size: 0.5rem;
        padding: 0.06rem 0.22rem;
    }

    [b-wvnp3qo1sm] .heap-sorted-marble {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }

    /* スマホ: dist-bucket をさらに小さく */
    [b-wvnp3qo1sm] .dist-bucket-body {
        width: 36px;
        min-height: 42px;
        padding: 3px 2px;
    }

    [b-wvnp3qo1sm] .dist-marble {
        width: 30px;
        height: 30px;
        font-size: 0.72rem;
        border-width: 2px;
    }

    [b-wvnp3qo1sm] .dist-buckets {
        gap: 3px;
    }

    [b-wvnp3qo1sm] .dist-bucket-label {
        font-size: 0.62rem;
    }

    [b-wvnp3qo1sm] .dist-histogram {
        min-height: 120px;
    }

    [b-wvnp3qo1sm] .dist-histogram-bar {
        width: 26px;
    }

    [b-wvnp3qo1sm] .dist-histogram-count {
        font-size: 0.65rem;
    }

    [b-wvnp3qo1sm] .dist-histogram-label {
        font-size: 0.62rem;
    }

    .toggle-btn[b-wvnp3qo1sm] {
        font-size: 0.72rem;
        padding: 0.25rem 0.5rem;
    }

    .tutorial-cards-panel .controls-fieldset[b-wvnp3qo1sm] {
        gap: 8px;
    }

    .tutorial-cards-panel input[type="range"][b-wvnp3qo1sm] {
        width: 100%;
    }

    /* desc-name + try-btn が横に収まらない場合は縦に折り返す */
    .tdp-header[b-wvnp3qo1sm] {
        position: relative;
        padding-right: 36px;
    }

    .tdp-header__left[b-wvnp3qo1sm] {
        flex-wrap: wrap;
    }

    .tdp-header__right[b-wvnp3qo1sm] {
        flex-wrap: wrap;
    }

    /* モバイル: 説明折りたたみトグルを右上に固定 */
    .tdp-toggle[b-wvnp3qo1sm] {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        right: 0;
    }
}
