/* 全体レイアウト */


.profile-container {
    margin-top: 80px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

/* 左半分：立ち絵 */
.profile-image {
    max-width: 600px;  /* 最大幅 */
    max-height: 800px;       /* 親要素内で幅を100%に設定 */
    height: auto;      /* 高さを自動調整 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;  /* 背景を透明に設定 */
    border: 2px solid #ffffff;     /* 白い枠を追加 */
    padding: 10px;
    border-radius: 10px;
}


.profile-image img {
    max-width: 100%;
    max-height: 600px;
    border-radius: 10px;

}

/* 右半分 */
.main-content {

    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 上段：アイコンリスト */
/* アイコンリスト */
.icon-list ul {
    display: grid;
    grid-template-columns: repeat(10, 40px);  /* PCの時は10列 */
    grid-template-rows: repeat(3, 40px);  /* 3行 */
    gap: 10px;  /* アイコン間の余白 */
    background-color: transparent;
    padding: 10px;
    justify-items: center;  /* アイテムを中央揃え */
    align-items: center;    /* アイテムを縦方向に中央揃え */
}

/* アイコン枠 */
.icon-item {
    width: 40px;  /* アイコン枠の幅 */
    height: 40px; /* アイコン枠の高さ */
    display: flex;
    justify-content: center;

    border: 1px solid #dddddd;
    background-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* アイコン画像 */
.icon-item img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    cursor: pointer;
}

/* 空のアイコン枠 */
.empty-icon {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
}


    /* アイコンリストのグリッド設定 */
    .icon-list ul {
        grid-template-columns: repeat(10, 35px);  /* アイコンが小さくなっても10列保持 */
        grid-template-rows: repeat(3, 35px);      /* 3行保持 */
    }


/* 下段：プロフィール本文 */
.profile-description {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.profile-description h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.profile-description p {
    font-size: 16px;
    line-height: 1.5;
    color: #555;
}
h2{
    color: #191970;
}
/* レスポンシブ調整 */
@media (max-width: 767px) {
    .profile-container {
        flex-direction: column;
        padding: 10px;
    }

    .profile-description {
        padding: 15px;
    }

    /* アイコンのサイズを少し小さくする */
    .icon-item {
        width: 35px;
        height: 35px;
    }

    /* アイコンリストのグリッド設定 */
    .icon-list ul {
        grid-template-columns: repeat(10, 35px);  /* アイコンが小さくなっても10列保持 */
        grid-template-rows: repeat(3, 35px);      /* 3行保持 */
    }
}

/* ==================================== */
/* 日記アコーディオンセクション */
/* ==================================== */

/* コンテナ */
.diary-accordion-container {
    margin-top: 30px;
    border-top: 1px solid #44566c; /* bioとの区切り */
    padding-top: 15px;
}

/* ヘッダー（アコーディオンボタン） */
.accordion-header {
    display: block;
    cursor: pointer;
    background-color: #344755; /* ベースとなる暗い色 */
    padding: 10px 15px;
    border: 1px solid #44566c;
    border-radius: 4px;
    user-select: none;
    transition: background-color 0.2s;
    /* ★★★ ここに追記/修正 ★★★ */
    position: relative; /* z-indexが効くように設定 */
    z-index: 10;       /* 他の要素より手前に表示させる */
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: normal;
    color: #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background-color: #3e5061;
}

.toggle-icon {
    font-size: 0.8em;
    margin-left: 10px;
    transition: transform 0.3s;
}

/* アコーディオン開閉ロジック (チェックボックス利用) */
/* 内容エリアを非表示 */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #1a242f; /* リスト背景色 (入力フォームと同じ暗さ) */
    border: 1px solid #44566c;
    border-top: none;
    border-radius: 0 0 4px 4px;
position: relative; 
    z-index: 9;
}

/* チェックされたら内容を表示 */
.accordion-toggle:checked ~ .accordion-content {
    max-height: 2000px; /* ★ 500px を 2000px に変更してテスト */
}

/* チェックされたらアイコンを回転 */
.accordion-toggle:checked + .accordion-header .toggle-icon {
    transform: rotate(180deg);
}

/* 日記リストのスタイル */
.diary-list {
    padding: 10px 15px;
    list-style: none;
    margin: 0;
}

.diary-item {
    padding: 8px 0;
    border-bottom: 1px dotted #44566c;
}

.diary-item:last-child {
    border-bottom: none;
}

.diary-item a {
    color: #ecf0f1; /* リンク色 */
    text-decoration: none;
    font-size: 0.95em;
    display: block;
    transition: color 0.2s;
}

.diary-item a:hover {
    color: #5599ff; /* ホバーでアクセントカラー */
}

.diary-title {
    font-weight: bold;
}

.diary-date {
    font-style: italic;
    color: #bdc3c7; /* 日付は控えめに */
}

.no-diary {
    padding: 10px 15px;
    color: #bdc3c7;
    font-style: italic;
    text-align: center;
}

/* bioのpタグにクラスを追加してCSSで調整しやすくしました */
.bio-content {
    margin-bottom: 25px; 
}