/* 背景とフォント設定（背景ドットをhtmlに明確に指定） */
html {
    background-color: #fff5f9;
    background-image: radial-gradient(#ffd6e0 1px, transparent 0.8px);
    background-size: 20px 20px;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Sawarabi Gothic', sans-serif;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* background-color: transparent; 背景はhtmlに任せる */
    background-color: #ffe4ec;
}

/* サイドバー */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: #fff8fb;
    padding: 20px;
    border: 1px solid #ffd6e0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.1);
    height: fit-content;
}

/* コンテンツのラッパー */
.container-custom {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0px 0px; /* ← 上下:60px 左右:10px など */
    background-color: #ffe4ec; /* ← ここが重要：ピンク背景 */
    padding-bottom: 20px;
}

.group-header-area {
    background: linear-gradient(to right, #ffe4ec, #fff5f9) !important;
    padding: 5px 20px 5px 20px !important;
    border-bottom: 1px solid #f8c5d5 !important;
}

.group-header-area .group-name {
    font-size: 1.6rem !important;
    font-weight: 600 !important;
    color: #555 !important;
    margin: 0 !important;
    padding-left: 20px !important;
    border-left: 4px solid #ffa0c5 !important;
}

.main-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 1280px;
    border-radius: 10px;
    padding: 0 30px;
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.15);
}

/* TOP画像本体 */
/* 画像を縦横どちらも縮小して全体表示させる */
.top-image {
    width: 100%;
    height: 280px; /* 好みの高さに設定、例: 280px や 300px */
    object-fit: cover;
    object-position: center;
    display: block;
}

/* TOP画像ラッパー - 横に余った分は黒で覆う */
.top-image-wrapper {
    width: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px; /* 固定高さ */
    overflow: hidden;
}

.top-image-container {
    position: relative;
    height: 500px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-image-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--top-image-url); /* ← 動的に置き換えられる */
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    z-index: 0;
    transition: background-image 0.3s ease;
}

img.top-image {
    position: relative;
    z-index: 1;
    height: 100%;
    width: auto;
    object-fit: contain;
}

.top-image-container img.top-image {
    height: 100%;         /* ← 高さに合わせる */
    width: auto;          /* ← 横は自動縮小 */
    object-fit: contain;  /* ← トリミングしない */
    display: block;
}

/* 横長画像：縦に合わせる */
.top-image.cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* 正方形や縦長画像：全体を表示、上下切らない */
.top-image.contain {
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.sns-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: inline-block;
    transition: transform 0.2s ease;
}

.sns-icon-img:hover {
    transform: scale(1.1);
}

.image-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 0;
}

.image-slider-wrapper {
    overflow: hidden;
    width: 650px; /* 130px x 5枚表示 */
}

.image-slider {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-image-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    margin: 0 5px;
    border-radius: 10px;
    background-color: #fff;
    overflow: hidden;
}

.slider-arrow {
    background: #fff;
    border: none;
    font-size: 20px;
    color: #d63384;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
    z-index: 10;
}
.slider-arrow:hover {
    background-color: #ffd6e0;
}
.image-slider {
    display: flex;
    transition: transform 0.5s ease;
    scroll-behavior: smooth;
}
/* スライダー全体のレイアウト */
.image-slider-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* スライダー本体の枠 */
.image-slider-wrapper {
    overflow: hidden;
    width: 100%;
}

/* スライドの中身（横並び） */
.image-slider {
    display: flex;
    transition: transform 0.5s ease;
}



/* 実際の画像 */
.slider-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 矢印ボタン */
.slider-arrow {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    position: relative; /* これを absolute から relative に変更 */
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    margin: 0 15px; /* スライダーから少し外に出す */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    z-index: 10;
}
.image-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* ボタンとスライダーの間隔 */
}


.left-arrow {
    left: 10px;
}

.right-arrow {
    right: 10px;
}

/* SNSリンク */
.sns-links {
    display: flex;
    flex-wrap: wrap; /* 折り返しを許可 */
    justify-content: center;
    gap: 10px;
    padding: 15px;
    /* ↓ 以下を削除 or 上書き */
    /* background-color: #fff0f5; */
    /* border-bottom: 2px solid #f8a1b0; */
    background-color: transparent;
    border: none;
}

.sns-links a {
    padding: 10px 20px;
    border: 1px solid #ffc0cb;
    border-radius: 20px;
    background-color: white;
    color: #d63384;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.sns-links a:hover {
    background-color: #ff99cc;
    color: white;
}

/* メンバーカード */
.member-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
}


.member-card {
    display: block;
    width: 180px;
    padding: 3px;
    background-color: #ff99cc; /* ピンク */
    border-radius: 15px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.member-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.3);
}

.member-card img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.member-name {
    margin-top: 8px;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    font-family: 'Sawarabi Gothic', sans-serif;
}

.member-card-wrapper {
    display: inline-block;
    text-align: center;
    margin: 10px;
}

/* レビュー入力 */
textarea.form-control {
    border-radius: 10px;
    border: 1px solid #ffc0cb;
}

.news-box {
    width: 50%;
    min-width: 300px;
    margin: 0 auto;
}

.news-scroll-box {
    max-height: 125px; /* ← 高さを半分に */
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
}

.slider-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 960px;
    height: 130px;
    margin: 0 auto; /* ← 余白を消す */
    gap: 10px;
    background-color: #fff; /* ← 白背景に変更 */
    padding: 0 10px;
    box-sizing: border-box;
    position: static;
    transform: none;
    z-index: auto;
}

/* 必要なモーダル基本スタイル */
#modalImage {
    transition: transform 0.3s ease;
}
#modalImage:hover {
    transform: scale(1.02);
}

/* 画像バツボタン */
.modal-content {
    background-color: transparent !important;
    border: none;
    box-shadow: none;
}

.btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1055;
    background-color: rgba(0,0,0,0.6); /* 背景が透明な場合に見えやすくする */
    padding: 0.5rem;
    border-radius: 50%;
    filter: invert(1); /* 白背景でも視認性 */
}
.btn-close:hover {
    background-color: rgba(0,0,0,0.8);
}
.intro-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
    text-align: left;
}

.profile-header {
    text-align: center;
    margin: 40px 0 20px;
}

.profile-header h1 {
    font-size: 3rem;
    color: #ff1493;
    font-weight: bold;
    letter-spacing: 2px;
}

.news-header {
    margin: 40px 0 20px;
}

.news-header h2 {
    font-size: 2rem;
    color: #ff1493;
    font-weight: bold;
    letter-spacing: 2px;
}

/* お知らせスタイル改善 */
.news-box {
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.news-header {
    border-bottom: 2px solid #ffd6e0;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.news-header h2 {
    font-size: 1.6rem;
    color: #ff69b4;
    font-weight: 600;
}

.news-list-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f4d2da;
    transition: color 0.2s ease;
}

.news-list-item a {
    text-decoration: none;
    color: #333;
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.news-list-item:hover a {
    color: #ff69b4;
}

.news-list-item small {
    color: #888;
    min-width: 80px;
}

/* ===== 投票ランキングデザイン ===== */
.vote-ranking-section {
    background-color: #fff0f6;
    border: 2px solid #ffc0cb;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(255, 182, 193, 0.1);
}
.ranking-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #d63384;
}
.vote-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.vote-ranking-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(255, 192, 203, 0.2);
    transition: transform 0.2s ease;
}
.vote-ranking-item:hover {
    transform: translateY(-3px);
}
.vote-ranking-item.first-place {
    background: linear-gradient(to right, #ffe0ec, #ffe6f2);
    border: 2px solid #ff69b4;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
}

/* ランキング番号とバッジ */
.ranking-number {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ff1493;
    width: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.badge-rank {
    margin-top: 5px;
    font-size: 1.5rem;
}

/* ユーザー画像 */
.ranking-user-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid #ffc0cb;
}

/* ユーザー情報 */
.ranking-user-info {
    display: flex;
    flex-direction: column;
}
.ranking-user-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #d63384;
}
.ranking-vote-count {
    font-size: 0.95rem;
    color: #666;
}

/* ===== レビューセクション：シンプル＆上品に ===== */
/* ===== レビューセクション：区切りが明確なシンプルデザイン ===== */
.review-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #c2185b;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.review-card {
    position: relative;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.review-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 4px;
    background-color: #f8bbd0;
    border-radius: 2px;
}

.review-user-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #f8bbd0;
}

.review-user-name {
    font-size: 1rem;
    color: #c2185b;
    font-weight: 600;
}

.review-content {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    padding-left: 10px;
    white-space: pre-wrap;       /* 改行維持 */
    overflow-wrap: anywhere;     /* 連続文字も折返し */
    word-break: break-word;      /* 互換用 */
    word-wrap: break-word;       /* 旧名（fallback） */
}

.review-date {
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
    text-align: right;
    padding-left: 10px;
}

/* 投稿フォームボックス */
.review-post-box {
    background-color: #fff;
    border: 2px solid #ffc0cb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(255, 182, 193, 0.1);
    max-width: 800px;
    margin: 0 auto 30px;
}

/* テキストエリア */
.custom-textarea {
    border-radius: 8px;
    border: 1px solid #f8bbd0;
    resize: vertical;
    padding: 10px;
    font-size: 0.95rem;
}

/* 送信ボタン */
.custom-review-btn {
    background-color: #ff69b4;
    color: white;
    font-weight: bold;
    border-radius: 20px;
    padding: 8px 20px;
    border: none;
    transition: background-color 0.3s ease;
}

.custom-review-btn:hover {
    background-color: #ff1493;
}

.unregistered-box {
    background-color: #fff3f8;
    border: 3px dotted #ff91ae;
    color: #d63384;
    font-size: 1.3rem;
    text-align: center;
    padding: 18px 24px;
    border-radius: 16px;
    max-width: 500px;
    margin: 0 auto 20px; /* ← これだけでOK */
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 105, 135, 0.15);
    animation: popIn 0.5s ease;
}
/* PC表示時の投票ボタンサイズを指定 */
#voteBtn img,
#voteBtnGuest img {
    height: 60px;
}
.group-name-header {
    background: linear-gradient(to right, #ffccdf, #ffeaf5); /* やさしいピンク系グラデ */
    color: #e91e63; /* 華やかなピンク */
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    padding: 12px 0; /* 高さを抑える */
    margin: 0;
    width: 100vw; /* 横幅いっぱいに */
    border-radius: 0; /* 丸みなし（上部に重ねるとき不要） */
    font-family: 'Sawarabi Gothic', 'Comic Sans MS', 'cursive', sans-serif; /* アイドルっぽさを演出 */
    box-shadow: 0 2px 6px rgba(255, 182, 193, 0.3); /* 控えめな影 */
    letter-spacing: 1px;
}

#userMenu {
    right: 0; /* これで親要素の右端に合わせて出す */
    background: linear-gradient(to bottom right, #ffc0cb, #ffb6c1); /* 任意 */
    border-radius: 12px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    overflow: hidden;
  }

  .review-card,
.review-content,
.review-user-name { max-width: 100%; }
.review-card a{ min-width: 0; }
.review-user-name{
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 576px) {
    .member-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        justify-content: center;
    }
    .member-card {
        width: 100%;
        margin: 0 auto;
    }
    .intro-box,
    .news-box {
        width: 100%;
        padding: 0 10px;
    }
    .review-post-box {
        padding: 0 10px;
    }
    .vote-ranking-section {
        padding: 15px;
    }
    .review-card {
        font-size: 0.9rem;
        padding: 12px 10px;
    }
    .ranking-user-img {
        width: 48px;
        height: 48px;
    }
    .ranking-number {
        width: 60px;
        font-size: 1.1rem;
    }
    #voteBtn img, #voteBtnGuest img {
        height: 45px;
    }
    .footer {
        font-size: 0.8rem;
    }
    .profile-header h1,
    .ranking-title {
        font-size: 1.6rem;
    }
    .container-custom {
        padding: 0px 10px;
    }
    .main-content {
        padding: 0px 20px;
    }
    .slider-overlay {
        position: relative; /* ← これ重要！ */
    }
    .review-card {
        padding: 12px 16px;
    }
    .review-post-box {
        padding: 15px;
    }
    .custom-review-btn {
        width: 100%;
    }
    .top-image-container {
        height: 300px; /* ← 高さを指定（お好みで調整） */
        flex-direction: column;
    }
    .top-image-container img.top-image {
        width: 100%;
        height: 100%;
        object-fit: cover; /* ← 高さに合わせて拡大、横が切れてもOK */
        max-width: none;
        max-height: none;
    }
    .vote-button img {
        max-width: 100%;
        height: auto;
    }
    .image-slider-wrapper {
        width: 100% !important;
    }
    .slider-image-wrapper {
        width: 48%; /* 2つ並ぶように調整 */
        margin: 0 1%;
    }
    .slider-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .image-slider-container {
        position: relative;
        width: 100%;
        padding: 0 10px; /* スライダーが画面端に近づきすぎないように余白 */
    }
    .slider-arrow {
        position: absolute;
        top: 50%;                    /* ← 高さ中央 */
        transform: translateY(-50%); /* ← 中央揃え */
        z-index: 10;
        background: white;
        border-radius: 50%;
        font-size: 20px;
        padding: 8px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

    .left-arrow {
        left: -20px;  /* ← スライダーの左外に表示（必要に応じて微調整） */
    }

    .right-arrow {
        right: -20px; /* ← スライダーの右外に表示（必要に応じて微調整） */
    }
}

@media (max-width: 768px) {
    .image-slider-wrapper {
        width: 100%;
    }
    .slider-overlay {
        width: 100%;
    }
}

body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 30vw;
    background-image: var(--top-image-url);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: blur(30px);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
    transition: background-image 0.3s ease;
}
body::before {
    left: 0;
}
body::after {
    right: 0;
}