.team-page {
    margin: 10px auto;
    max-width: 800px;
}

.team-page-header {
    margin-bottom: 0px !important;
} 

.team-logo {
    margin: 20px auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10vw;           /* ビューポート幅の30% */
    height: 10vw;          /* 正方形を保つ */
    max-width: 160px;      /* 大きくなりすぎないように制限 */
    max-height: 160px;
    min-width: 80px;       /* 小さすぎないように制限 */
    min-height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.team-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* アスペクト比を保って収める */
    display: block;
}

/* ロゴ画像ブロック全体の枠 */
.team-logo.edit-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

/* 画像表示用のラベル部分 */
.team-photo-placeholder {
    display: inline-block;
    width: 220px;       /* 横長サイズに調整 */
    height: 120px;      /* 高さも明示 */
    border: 1px dashed #ccc;
    border-radius: 8px;
    background-color: #fafafa;
    overflow: hidden;
    position: relative;
}

/* 実際の画像 */
#team-logo-preview {
    width: 100%;
    height: 100%;
    object-fit: contain; /* アスペクト比を保って枠内に収める */
    display: block;
}


/* Item container styling */
.team-page-item {
    gap: 8px;
    margin-bottom: 20px !important;
}

/* Label styling */
.team-page-item strong {
    flex-shrink: 0;
    width: 90px;
    text-align: right;
    font-weight: bold;
    color: #333;
}

.team-page-item-header {
    font-size: 1em !important;
    font-weight: bold;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* Black with 10% opacity */
    padding-bottom: 2px !important; /* Slight padding for separation */
    margin-bottom: 6px !important;
}

.team-page-item-value {
    font-size: 1em;
    color: #333;
    margin: 0;
}

.edit-profile-button,
.feedback-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color); /* Base color */
    color: #fff; /* White text */
    text-decoration: none;
    font-size: 12px !important;
    border-radius: 45px;
    border: none;
    transition: background-color 0.3s ease;
}

.edit-profile-button:hover,
.feedback-button:hover {
    background-color: #005ea1; /* Darker blue for hover effect */
    color: #fff;
}

/* Styling for the logged-in user menu */
.loggedin_user_menu {
    display: flex;
    justify-content: center; /* ← 中央寄せ */
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
    gap: 10px; /* アイテム間の余白を適宜追加 */
}

/* Specific button styles within the logged-in user menu */
.loggedin_user_menu .edit-profile-button,
.loggedin_user_menu .button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--primary-color); /* Using your site’s base color */
    color: white;
    border: none;
    border-radius: 45px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.loggedin_user_menu .edit-profile-button:hover,
.loggedin_user_menu .button:hover {
    background-color: #005f91; /* Darker shade for hover effect */
}

.team-photo-carousel-wrapper {
    position: relative;
    width: 500px; /* ← ビューポート幅全体に広げる */
    max-width: 600px;        /* ← デスクトップでは制限 */
    margin: 0 auto;
    padding: 0 10px;
}

.team-photo-carousel {
    height: 320px; /* 適度な高さ */
    display: flex;
    overflow-x: auto;
    overflow-y: hidden; /* ← 縦方向のはみ出し防止 */
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: flex-start;
    align-items: center; /* ← 画像を上下中央に配置 */
    scroll-snap-type: x mandatory; /* スクロールスナップも追加するとさらに良い */
    width: 100%;
    max-width: 100%;
    gap: 12px; /* ← 画像と画像の間のスペースを追加 */
    scroll-padding-inline: 0; /* ← gapと同じ分だけ余白として扱う */
    
}
@media screen and (max-width: 600px) {
    .team-photo-carousel {
        height: 200px; /* モバイルでは高さを抑える */
        padding-right: 120px; /* モバイルでのみ右側に余白を追加 */
    }
}

/* --- チーム写真（閲覧用）の共通設定 --- */
.team-photo-carousel img {
    flex: 0 0 auto;         /* 画像幅を自動に（100%固定をやめる） */
    height: auto;            /* 高さは自動（比率保持） */
    width: auto;              /* 横幅をwrapperいっぱいに */
    max-height: 100%; /* ← これが重要！親の高さ内に収める */
    max-width: 100%;         /* 親要素の中に収める */
    object-fit: contain;     /* 切らずに全体を表示 */
    border-radius: 12px;     /* 丸み */
    display: block;
    scroll-snap-align: start;  /* スナップを先頭に */
}

/* 編集モード（クラス .edit-mode が付与された時）→ 中央寄せ */
.team-photo-carousel.edit-mode {
    justify-content: flex-start;
}

/* 編集画面用 */
.team-photo-carousel.edit-mode img {
    width: 100px;
    height: 100px;
    border-radius: 5%;
    object-fit: cover;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.team-photo-carousel.edit-mode img:hover {
    background-color: #eee;
    transform: scale(1.03);
}

/* 編集時の各ブロック */
.team-photo-edit-block {
    position: relative;
    flex-shrink: 0;
    max-width: 300px;
}

/* 削除ボタン */
.remove-photo-button {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    margin-top: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.remove-photo-button:hover {
    background-color: #d32f2f;
}

/* 外側の円 */
.team-photo-placeholder {
    width: 100px;
    height: 100px;
    border: 2px dashed #ccc;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-photo-carousel.edit-mode img.placeholder {
    width: 40px; /* ← アイコンだけ小さく */
    height: 40px;
    object-fit: contain;
    pointer-events: none; /* 画像クリックでinput反応するなら */
}

.team-photo-carousel.edit-mode img.placeholder:hover {
    background-color: #eee;
    transform: scale(1.05);
}

/* 写真がアップロードされているとき */
.team-photo-placeholder img:not(.placeholder) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}



.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: rgba(0, 0, 0, 0.3);
    background-color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    user-select: none;
    cursor: pointer;
}

.carousel-arrow:hover {
    color: rgba(0, 0, 0, 0.8);
    background-color: #eee;
}

.carousel-arrow.left-arrow {
    left: 5px;
}

.carousel-arrow.right-arrow {
    right: 5px;
}

.add-photo-button {
    background-color: #4caf50; /* 緑系 */
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-photo-button:hover {
    background-color: #388e3c;
}

.team-logo-buttons {
    margin-top: 10px;
    text-align: center;
}

.add-logo-button {
    background-color: #4caf50; /* 緑系 */
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-logo-button:hover {
    background-color: #388e3c;
}

.editable-header {
    position: relative;
}

.teamname-input {
    width: 100%;
    font-size: 24px;
    font-weight: bold;
    border: none;
    border-bottom: 1px solid #ccc;
    padding-right: 30px; /* アイコンの余白 */
    height: 40px; /* 必要に応じて高さ調整 */
    line-height: 40px;
    box-sizing: border-box;
}

.edit-icon {
    position: absolute;
    right: 30px;
    top: 40%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
    pointer-events: none;
}

.post-event-button-wrapper {
    text-align: center;
    margin: 28px 0;
}

@media screen and (min-width: 768px) {
    .team-photo-carousel.edit-mode img {
      width: 180px;
      height: 180px;
    }
  
    .team-photo-placeholder {
      width: 180px;
      height: 180px;
    }
  
    .team-photo-edit-block {
      max-width: 200px;
    }
  
    .remove-photo-button,
    .add-photo-button {
      font-size: 13px;
      padding: 6px 12px;
    }
  }
  
  .editable-field {
    position: relative;
}

.editable-field .edit-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 14px;
    pointer-events: none;
    opacity: 0.6;
}

.editable-field:hover .edit-icon {
    opacity: 1;
}
.line-setting-link-wrapper {
    text-align: center;
    margin-top: 2em;
}

.line-setting-link-button {
    background-color: #06C755;         /* LINEグリーン */
    color: #fff;
    padding: 0.75em 1.5em;
    border-radius: 45px;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* ← 追加したシャドウ */
}

.line-setting-link-button:hover {
    background-color: #05b14c;
    color: #fff;
    transform: scale(1.05); /* Subtle scaling effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* ← ホバー時は少し強調 */
}

.team-action-buttons {
    display: flex;
    gap: 6px;
}
  
.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    cursor: default;
    font-size: 14px;
    color: #555;
}
  
/* いいねボタン（特別な色） */
.like-button i.liked {
    color: #016fcd; /* または #ff4d4f, crimson など */
    transition: color 0.2s ease;
}
  
/* 共通スタイルに戻す */
.team-action-buttons .like-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}
  
.team-action-buttons .like-button:hover {
    border-color: #999;
    background-color: #f8f8f8;
}
  
@keyframes pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}
  
.like-button i.pop {
    animation: pop 0.3s ease;
}
  