/* ═══════════ 共通キャラクターピッカー ═══════════ */

.pro-char-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-height: 340px;
    padding: 2px 4px 4px;
    overflow-x: hidden;
    overflow-y: auto;
}

.pro-char-divider {
    grid-column: 1 / -1;
    height: 0;
    margin: 4px 2px;
    border-top: 1px solid #e2e8f0;
}

.pro-char-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 8px 4px 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pro-char-option:hover {
    background: rgba(20, 115, 103, 0.055);
}

.pro-char-option.is-selected {
    border-color: rgba(20, 115, 103, 0.5);
    background: rgba(20, 115, 103, 0.08);
}

.pro-char-option.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pro-char-option-icon {
    display: block;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    background: transparent;
}

.pro-char-option.is-unit .pro-char-option-icon {
    border-radius: 6px;
}

.ba-char-picker-host .pro-char-option-icon,
.uma-char-picker-host .pro-char-option-icon {
    border-radius: 0;
    object-fit: contain;
}

.pro-char-option-name {
    max-width: 100%;
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 769px) {
    .pro-char-option-icon {
        width: 68px;
        height: 68px;
    }

    .pro-char-option-name {
        font-size: 0.82rem;
    }
}

@media (max-width: 560px) {
    .pro-char-picker,
    .ba-char-picker-host .pro-char-picker,
    .uma-char-picker-host .pro-char-picker {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        padding-inline: 0;
    }

    .pro-char-option {
        width: 100%;
        min-width: 0;
        padding: 6px 2px;
        box-sizing: border-box;
    }

    .pro-char-option-icon {
        width: clamp(46px, 14vw, 58px);
        height: clamp(46px, 14vw, 58px);
    }

    .pro-char-option-name {
        font-size: 0.68rem;
    }
}
