@charset "UTF-8";

@font-face {
    font-family: 'CustomFont'; /* フォントの名前 */
    src: url('../fonts/zen-maru-gothic-v18-japanese-700.woff2') format('truetype'); /* フォントファイルへのパス */
    font-weight: 900; /* より細いフォントの太さ */
    font-style: normal; /* フォントのスタイル */
  }
@font-face {
    font-family: 'CustomFont2'; /* フォントの名前 */
    src: url('../fonts/baloo-regular.ttf') format('truetype'); /* フォントファイルへのパス */
    font-weight: 900; /* より細いフォントの太さ */
    font-style: normal; /* フォントのスタイル */
  }

body {
    font-family: 'CustomFont', sans-serif;
}

main{
    padding: 20px;
}

.section_cover {
    width: 100%;
    max-width: 800px;
    margin: 250px auto 150px;
    padding: 15px;
    border-radius: 40px;
    background-image: url(../img/23349316.jpg);
    background-size: cover;
    position: relative;
    z-index: 10; /* フォームが上に来る */
    overflow: visible;
}

.form_section {
    width: 100%;
    border-radius: 40px;
    background-color: white;
    padding: 50px;
    color: rgb(46, 46, 46);
    position: relative;
    z-index: 20; /* キャラより手前 */
}


.form_section h1 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 80px;
}

/* メダルセクション */
.medal-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.medal-box-wrapper {
    background-image: url(../img/medal.jpg);
    background-size: cover;
    background-position: top center;
    padding: 40px 20px 20px 20px; /* 上を広めに取る */
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative; /* 絶対配置の基準に */
    text-align: center; /* 中央揃え */
    margin-bottom: 50px;
}
.medal-box-wrapper h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    margin-bottom: 10px;
}

/* メダル画像 */
.medal-box {
    position: absolute;
    top: -40px; /* 枠からはみ出す高さ */
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 2;
}

.medal-box img {
    width: 80px;
    height: 80px;
}

.medal-box.clickable:hover {
    transform: translateX(-50%) scale(1.1);
}

.medal-box.disabled {
    opacity: 0.5;
    cursor: default;
}

/* ユーザー保持者一覧 */
.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
    font-size: 0.9em;
}

.modal-img {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 15px;
}

.member-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}

/* モーダルは既存の指定CSSを利用 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999; /* 高くする */
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    color: white;
}

.modal-content {
    background-image: url(../img/fade.jpg);
    background-size: cover;
    background-position: center top;
    padding: 50px 20px;
    max-width: 300px;
    position: relative;
    border-radius: 8px;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.modal-img {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 15px;
}

.modal-content h3{
    font-size: 1.5em;
    margin-bottom: 15px;
}

#modal-desc{
    color: white!important;
}

.close {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
}


.waving-character {
    position: absolute;
    top: -100px;
    right: 60px;
    width: 180px;
    height: auto;
    z-index: 5;
    transform: translateY(100%); /* 最初は完全に下に隠す */
    opacity: 0;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
    pointer-events: none;
}
.waving-character img {
    width: 100%;
    display: block;
}

/* ひょっこり出てくる状態 */
.waving-character.show {
    transform: translateY(0);
    opacity: 1;
}


@media (max-width: 600px) {
    .section_cover {
    width: 100%;
    max-width: 800px;
    margin: 180px auto 100px;
    padding: 15px 10px;
    border-radius: 40px;
    background-image: url(../img/23349316.jpg);
    background-size: cover;
    position: relative;
    z-index: 10; /* フォームが上に来る */
    overflow: visible;
}


.form_section h1 {
    text-align: center;
    font-size: 1em;
    margin-bottom: 60px;
}

.form_section {
    width: 100%;
    border-radius: 40px;
    background-color: white;
    padding: 40px 20px;
    color: rgb(46, 46, 46);
    position: relative;
    z-index: 20; /* キャラより手前 */
}

.waving-character {
    position: absolute;
    top: -60px;
    right: 30px;
    width: 110px;
    height: auto;
    z-index: 5;
    transform: translateY(100%); /* 最初は完全に下に隠す */
    opacity: 0;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
    pointer-events: none;
}

}