
.note_content {
    margin: 20px 0;
}
.search_box {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 10px 30px;
}
.unit_list {
    list-style: none;
    padding: 10px 0 0 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 12px;
}

.unit_item {
    margin-bottom: 6px;
}
.unit_link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    padding: 6px 10px;
    border-radius: 6px;
    background: #fafafa;
    border: 1px solid #e6e6e6;
    transition: background 0.15s, border-color 0.15s;
}
.rank-UR {
    background-color: rgba(255, 77, 77, 0.10);
}
.rank-UR:hover {
    background-color: rgba(255, 77, 77, 0.16);
}
.rank-SSR {
    background-color: rgba(212, 175, 55, 0.10);
}
.rank-SSR:hover {
    background-color: rgba(212, 175, 55, 0.16);
}
.rank-SR {
    background-color: rgba(179, 102, 255, 0.10);
}
.rank-SR:hover {
    background-color: rgba(179, 102, 255, 0.16);
}
.rank-R {
    background-color: rgba(77, 166, 255, 0.10);
}
.rank-R:hover {
    background-color: rgba(77, 166, 255, 0.16);
}


.unit_icon {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.unit_info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.height_specification {
    min-height: 150px;
}
.unit_name {
    font-weight: 600;
    font-size: 14px;
}
.unit_meta {
    font-size: 11px;
    color: #777;
    margin-top: 1px;
}

.search_container {
    position: relative;
    box-sizing: border-box;
    border: 2px solid #007bff;
    display: block;
    padding: 3px 10px;
    border-radius: 6px;
    height: 2.4em;
    width: 260px;
    overflow: hidden;
    background: #fff;
}
.search_container input[type="text"] {
    border: none;
    height: 2.0em;
    width: 100%;
    font-size: 14px;
    
}
.search_container input[type="text"]:focus {
    outline: 0;
}
.search_container input[type="submit"] {
    cursor: pointer;
    font-family: FontAwesome;
    border: none;
    background: #007bff;
    color: #fff;
    position: absolute;
    width: 3.0em;
    height: 2.6em;
    right: 0;
    top: -2px;
    outline: none;
    font-size: 15px;
    border-radius: 0 4px 4px 0;
}
.search_group {
    display: flex;
    flex-direction: column;
    width: 32%;
    min-width: 240px;
}
.search_label {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #444;
}

/* 兵種セレクト画面 */
.unit_type_select {
    position: relative;
    box-sizing: border-box;
    width: 260px;
    height: 38.39px;
    padding: 3px 36px 3px 10px;
    border: 2px solid #007bff;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    cursor: pointer;

    background-image:
        linear-gradient(45deg, transparent 50%, #007bff 50%),
        linear-gradient(135deg, #007bff 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.unit_type_selected {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    font-size: 0.9rem;
}

.unit_type_selected img {
    width: 20px;
    height: 20px;
    background-color: #007bff;
    border-radius: 4px;
}

/* ▼ 遅延ゼロ版ドロップダウン */
.unit_type_dropdown {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    z-index: 10;

    visibility: hidden;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.unit_type_dropdown.open {
    visibility: visible;
    opacity: 1;
}

.unit_type_option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.unit_type_option:hover {
    background: #f0f0f0;
}

.unit_type_option img {
    width: 24px;
    height: 24px;
    background-color: #007bff;
    border-radius: 4px;
}

.unit_type_option span {
    color: #1e1e1e;
}


/* ▼ ランクセレクト（兵種と完全統一） */
.rank_select {
    position: relative;
    box-sizing: border-box;
    width: 260px;
    height: 38.39px;
    padding: 3px 36px 3px 10px;
    border: 2px solid #007bff;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    cursor: pointer;

    background-image:
        linear-gradient(45deg, transparent 50%, #007bff 50%),
        linear-gradient(135deg, #007bff 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.rank_selected {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    font-size: 0.9rem;
    color: #1e1e1e;
}

/* ▼ 遅延ゼロ版ドロップダウン */
.rank_dropdown {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    z-index: 10;

    visibility: hidden;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.rank_dropdown.open {
    visibility: visible;
    opacity: 1;
}

.rank_option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.rank_option:hover {
    background: #f0f0f0;
}

/* ランク色分け（濃いめ・昭和感なし） */
.rank_ur { color: #cc0000; }
.rank_ssr { color: #b8860b; }
.rank_sr { color: #7a1fcc; }
.rank_r { color: #0066cc; }
.rank_all { color: #1e1e1e; }

/* その他レイアウト */
.rank_with_reset {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search_form {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 10px;
}

.rank_with_reset {
    display: flex;
    align-items: center;
    gap: 6px;
}
/* 軍団スキル */
.skill_select {
    position: relative;
    box-sizing: border-box;
    height: 38.39px;
    padding: 3px 36px 3px 10px;
    border: 2px solid #007bff;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    cursor: pointer;

    background-image:
        linear-gradient(45deg, transparent 50%, #007bff 50%),
        linear-gradient(135deg, #007bff 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.skill_selected {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    font-size: 0.9rem;
}

.skill_dropdown {
    position: absolute;
    top: 42px;
    left: 0;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 6px;
    display: none;
    z-index: 20;
}
.skill_dropdown.open {
    display: block;
}

.skill_option {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.skill_option:hover {
    background: #e6f0ff;
}

.skill_group_label {
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    background: #f0f6ff;
    border-top: 1px solid #d0e2ff;
}
.skill_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.9rem;
}

/* 左側：スキル名（1行固定＋省略） */
.skill_name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 200px;
}

/* 右側：数値 + MAX（固定幅で揃える） */
.skill_value_block {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;

    /* ← ここが最重要ポイント */
    width: 130px; 
}

/* 数値 */
.skill_value {
    font-weight: bold;
    white-space: nowrap;
    text-align: right;
    min-width: 50px; /* ← 数値の幅を固定して揃える */
}

/* MAX バッジ */
.skill_max_badge {
    background: #007bff;
    color: #fff;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
    border-radius: 2px;
}

/* 触って気持ちいいアニメーション */
@keyframes pop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.sort_container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.sort_option {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
/* パッシブスキル */
/* 対象アリリスト */
.duel_level_item {
    list-style: none;
}
.duel_target_list {
    margin: 6px 0 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

/* 対象アリの1つ */
.duel_target_item {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 6px;
}

/* 兵種アイコン */
.duel_target_icon {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

/* アリ名 */
.duel_target_name {
    font-size: 13px;
    white-space: nowrap;
}
.data_row {
    display: block; /* 横並びをやめて縦積みにする */
}

.duel_level_list {
    margin-top: 4px; /* スキル名との間に余白を作る */
}
/* 左側：検索ツール */
.search_left {
    display: flex;
    gap: 20px;
}

/* 右側：リセットボタン */
.search_right {
    display: flex;
    align-items: flex-end;
}
.reset_btn {
    width: 50px;
    height: 38.39px;
    border: 2px solid #007bff;
    background: #007bff;
    color: #fff;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.reset_btn:hover {
    background: #6aa0f2;
    border-color: #2f6ac0;
}


/* スマホ最適化 */
@media (max-width: 480px) {
    .search_container {
        width: 100%;
    }
    .search_select {
        flex: 1;
        min-width: 120px;
    }
    .unit_link {
        padding: 6px 8px;
        gap: 6px;
    }
    .unit_icon {
        width: 26px;
        height: 26px;
    }
    .skill_row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .skill_name {
        width: 100%;
        white-space: normal; /* ← スマホでは折り返しOK */
    }

    .skill_value_block {
        width: 100%;
        justify-content: flex-end;
    }
    .sort_container {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

}