/* =================================================================
 * 色覚チェック（visiontest-color）固有スタイル
 * スコープは #app-visiontest-color に限定
 * =================================================================
 */

/* --- タブメニュー横スクロール（他の視力検査ツールと同挙動） --- */
#app-visiontest-color .custom-scroll-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
#app-visiontest-color .custom-scroll-nav::-webkit-scrollbar {
    height: 5px;
}
#app-visiontest-color .custom-scroll-nav::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.4);
    border-radius: 3px;
}

/* --- ドットプレート --- */
#app-visiontest-color .plate-wrap {
    width: 100%;
    max-width: 340px;
}
#app-visiontest-color #plate-canvas {
    width: 100%;
    height: auto;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: #f3efe6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    /* 生成中のカクつきを見せない */
    touch-action: manipulation;
}

/* 選択肢ボタン */
#app-visiontest-color .plate-choice-btn {
    min-width: 84px;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0.6rem 1rem;
}

/* --- 色相並べ替え --- */
#app-visiontest-color .arrange-track-outer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}
#app-visiontest-color .arrange-pilot-col {
    flex: 0 0 auto;
    text-align: center;
}
#app-visiontest-color .arrange-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 64px;
    padding: 6px;
    border: 2px dashed var(--bs-border-color);
    border-radius: 10px;
    background: var(--bs-body-bg);
}

#app-visiontest-color .color-chip {
    width: 46px;
    height: 58px;
    border-radius: 8px;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: grab;
    touch-action: none;
    /* ドラッグ中のテキスト選択防止 */
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.12s ease;
}
#app-visiontest-color .color-chip:active {
    cursor: grabbing;
}
/* 基準チップ。彩度の高い枠は隣接色の見え方に影響するため付けず、
   下の「基準」ラベルで固定であることを示す */
#app-visiontest-color .pilot-chip {
    cursor: default;
}

/* SortableJS ドラッグ中のクラス */
#app-visiontest-color .chip-ghost {
    opacity: 0.35;
}
#app-visiontest-color .chip-chosen {
    transform: scale(1.08);
    box-shadow: inset 0 0 0 2px var(--bs-primary), 0 6px 14px rgba(0, 0, 0, 0.35);
}
#app-visiontest-color .chip-drag {
    transform: scale(1.08);
}

/* チップ番号（採点後に順序を可視化する用） */
#app-visiontest-color .color-chip .chip-order {
    display: none;
}
#app-visiontest-color .arrange-list.scored .color-chip {
    position: relative;
    cursor: default;
}
#app-visiontest-color .arrange-list.scored .color-chip .chip-order {
    display: block;
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

/* モバイル: チップをやや小さく詰める */
@media (max-width: 575.98px) {
    #app-visiontest-color .color-chip {
        width: 38px;
        height: 50px;
    }
    #app-visiontest-color .plate-choice-btn {
        min-width: 72px;
        font-size: 1.05rem;
    }
}
