
body {
    font-family: sans-serif;
}
/*スマホ対応*/
@media (max-width: 768px) {

    h1 {
        font-size: 24px;
        line-height: 1.3;
        margin-top: 10px;
        margin-bottom: 15px;
    }

    .skill-groups {
        flex-direction: column;
        gap: 10px;
    }

}

.table-wrapper {
    overflow-x: auto;
}

/*ヘッダー*/
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/*Xリンク*/
.x-link img:hover {
    opacity: 0.7;
}
.header a {
    text-decoration: none;
    font-size: 24px;
}

/*ボタン共通*/
.btn {
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;

    text-decoration: none;
    display: inline-block;

    font-size: 14px;
    line-height: 1;
    box-sizing: border-box;
}
/*検索ボタン*/
.btn-search {
    background-color: #2563eb;
}
.btn-search:hover {
    background-color: #1d4ed8;
}
/*登録ボタン*/
.btn-create {
    background-color: #16A34A;
}
.btn-create:hover {
    background-color: #15803D;
}
/* 編集ボタン */
.btn-edit {
    background-color: #F59E0B;
}
.btn-edit:hover {
    background-color: #D97706;
}
/* 削除ボタン */
.btn-delete {
    background-color: #DC2626;
}
.btn-delete:hover {
    background-color: #B91C1C;
}
/* 戻るボタン */
.btn-back {
    background-color: #6B7280;
}
.btn-back:hover {
    background-color: #4B5563;
}

/*検索・登録エリア*/
.search-and-registration-area { border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}
.search-and-registration-area div {
    margin-bottom: 8px;
}
.search-and-registration-area h2 {
    margin: 0 0 12px 0;
}
.search-and-registration-area select {
    margin-right: 8px;
    margin-bottom: 8px;
}
.selected-skills {
    margin: 10px 0;
}
.selected-skill-tag {
    display: inline-block;
    margin: 2px;
    padding: 4px 8px;

    border-radius: 12px;

    background-color: #eee;

    cursor: pointer;
}

/*領域スキルエリア*/
.area-skill-search {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.area-skill-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px 8px;
    margin-top: 8px;
}

.area-skill-groups label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.area-skill-groups input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
}

/*スキルエリア*/
.skill-area { display: inline-block;
    width: 140px;
}

/*スキル種別*/
.category-benefit {
    color: #2e8b57;
    font-weight: bold;
}

.category-debuff {
    color: #dc143c;
    font-weight: bold;
}

.category-holy {
    color: #1e90ff;
    font-weight: bold;
}

.category-sin {
    color: #ffb300;
    font-weight: bold;
}

.category-special {
    color: #666666;
    font-weight: bold;
}

.category-disaster {
    color: #8a2be2;
    font-weight: bold;
}

.skill-tag {
    display: inline-block;
    white-space: nowrap;
    padding: 2px 6px;
    margin: 2px;
    border-radius: 4px;
}

.skill-groups {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.skill-group {
    min-width: 150px;
}

.skill-initial {
    font-weight: bold;
    /*background: #f3f3f3;*/
    background: #f5f5f5;
    border-radius: 4px;
    padding: 2px 6px;
    margin-top: 8px;

    position: sticky;
    top: 0;
}

details {
    margin-top: 10px;
}

summary {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
}

/*スキル管理画面・領域スキル管理画面*/
.admin-table {
    border-collapse: collapse;
}
.admin-table th,
.admin-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
}

/*モーダル（スキル）*/
.modal {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.6);

    z-index: 9999;
}
.modal-content {

    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: min(900px, 90vw);

    max-height: 80vh;

    overflow-y: auto;

    background: white;

    border-radius: 12px;

    padding: 24px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3);
}

#closeModal {
    position: absolute;

    top: 10px;
    right: 15px;

    cursor: pointer;

    font-size: 28px;

    font-weight: bold;

    color: #666;
}

.close-modal:hover {
    color: #000;
}

.ability-popup-btn {
    cursor: pointer;
    font-weight: bold;
}

#abilityText {
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 15px;
    font-family: inherit;
}

#abilityTitle {
    margin-top: 0;
    margin-bottom: 20;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/*********************/
/*   検索画面（一覧）   */
/*********************/
table th {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px 8px;
    background-color: #f8fafc;
    vertical-align: middle;
}

table td {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px;
    vertical-align: middle;
}

table td .skill-tag {
    white-space: nowrap;
}

table td:has(.skill-tag) {
    white-space: normal;
    min-width: 150px;
}

/*右から１番目の列（状態付与(連携)）*/
table td:nth-last-child(1) {
    min-width: 80px;
    white-space: normal;
}

table th:nth-last-child(1) {
    min-width: 80px;
}