/* front-page.css */

/* ------------------------------
  ヒーローセクション
------------------------------ */
.sp-only {
    display: none;
}

/* ヒーローセクション共通 */
.hero-section {
    position: relative;
    width: 100%;
    height: 780px;
    background-color: #f8f8f8;
    background-image: url('/wp-content/uploads/2025/06/hero-bg.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
    margin-top: -80px;
}

/* 中身の幅調整 */
.hero-inner {
    max-width: 1080px;
    width: 100%;
    transform: translateY(-130px);
}


.hero-copy {
    font-family: 'M PLUS 1p', sans-serif;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    z-index: 1;
    position: relative;
}

.hero-copy .big {
    font-size: 80px;
}

.hero-copy .small {
    font-size: 60px;
}

.hero-copy .mid {
    font-size: 60px;
}

.hero-emphasis {
    position: relative;
    display: inline-block;
}

.hero-decoration {
    position: absolute;
    top: -62%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    width: 60%;
    max-width: 696px;
    pointer-events: none;
}

.hero-subcopy {
    font-size: 22px;
    text-align: center;
    line-height: 1.8;
    margin-top: 1.5rem;
    font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", sans-serif;
    color: #333;
}

/* スタートセクション全体 */
.start-section {
    background: transparent;
    position: relative;
    margin-top: -240px;
    z-index: 10;
}

.start-section .start-character {
    position: absolute;
    top: -160px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 93.5%;
    max-width: 1010px;
    height: auto;
    pointer-events: none;
}

.start-section .container {
    background-color: #FFF2DF;
    box-shadow: 8px 8px 0 #EA472C;
    max-width: 1080px;
    margin: 0 auto;
    padding: 60px 40px 30px;
    text-align: center;
    border-radius: 10px;
}

/* 見出し */
.start-heading {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
}

/* 選択ボックスエリア */
.start-select {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* 各選択オプション */
.start-option {
    background-color: #fff5f0;
    border: 2px solid #ff867c;
    border-radius: 12px;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #ff4d4d;
    min-width: 220px;
    text-align: center;
}

/* 診断エリア（プラグイン出力部） */
.start-diagnosis {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.start-heading {
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

.input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    margin-bottom: 32px;
    align-items: stretch;
}

/* === 全体の囲み枠 === */
.question-wrapper {
    position: relative;
    background-color: #FAFAFA;
    border: 1px solid #FA665A;
    border-radius: 2px;
    padding: 48px 20px 24px;
    /* 上は見出しスペースを確保 */
    box-sizing: border-box;
    overflow: visible;
}

.mbti-block .question-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.input-block {
    flex: 1 1 300px;
    /* 最小幅300px、必要に応じて縮小 */
    max-width: 480px;
}

.question-label-container {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* 前と同じ吹き出しスタイルに追加調整 */
.question-label {
    position: relative;
    display: inline-block;
    font-size: 20px;
    font-family: 'M PLUS 1p', sans-serif;
    font-weight: bold;
    color: #FA665A;
    background-color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.question-label::before {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.08) transparent transparent transparent;
    z-index: 0;
}

.question-label::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    z-index: 1;
}

.gender-options {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
}

.gender-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    background-color: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 0px rgba(183, 183, 183, 1);
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.gender-img{
    width: 120px;
}

.gender-card span {
    font-size: 22px;
}

/* スマホでもカードがはみ出さないよう調整 */
.gender-option {
    flex-shrink: 1;
    flex: 1;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option input[type="radio"][value="male"]:checked+.gender-card {
    background-color: #E0F8FF;
    border-color: #E0F8FF;
}

/* 女性が選択されたとき */
.gender-option input[type="radio"][value="female"]:checked+.gender-card {
    background-color: #FADCEC;
    border-color: #FADCEC;
}

#mbti-select {
    width: 100%;
    height: 86px;
    padding: 0 16px;
    font-size: 18px;
    border: 1px solid #DBDBDB;
    border-radius: 2px;
    color: #C4C4C4;
    background-color: #fff;
    box-sizing: border-box;
    appearance: none;
    /* ブラウザのデフォルトUIを消す */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='%23333' height='11' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 40px 30px;
}

#mbti-select:valid {
    color: #333;
}

#mbti-select option[value=""] {
    display: none;
}

/* === チェックボックスの外枠 === */
.check-status {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: 1px solid #C4C4C4;
  background-color: #fff;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.3s ease;
}

.check-status.checked {
  background: linear-gradient(to bottom, #FFCC24, #FA7300);
  border: 1px solid #FA7300;
}

.check-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark-icon {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* チェック済み時だけ表示 */
.check-status.checked .checkmark-icon {
  opacity: 1;
}


#start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 8px 16px 8px 40px;
    /* ← 右側を56pxに拡張！ */
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    background-color: #EA472C;
    border: 2px solid #fff;
    border-radius: 40px;
    box-shadow: 0 0 6px rgba(172, 96, 9, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ▶アイコン */
#start-button .arrow-icon {
    font-size: 18px;
    color: #fff;
    margin-left: auto;
    /* ← 右寄せに追加 */
}

/* 非活性状態（disabled） */
#start-button:disabled {
    background-color: #E0E0E0;
    border: 2px solid #ccc;
    color: #888;
    box-shadow: 0 0 6px rgba(172, 96, 9, 0.2);
    /* ← 薄めに影を残す */
    cursor: not-allowed;
}

#start-button:disabled .arrow-icon {
    color: #aaa;
}




/* キャラクター一覧 */
.character-section {
    padding: 6rem 1rem;
    background-color: #fff;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1080px;
    margin: 0 auto;
}

.character-grid img {
    width: 100%;
    height: auto;
    display: block;
}


@media (max-width: 768px) {
    .sp-only {
        display: inline;
    }

    .hero-inner {
        transform: translateY(-160px);
    }

    .hero-copy {
        font-size: 30px;
        text-align: center;
        line-height: 1.4;
    }

    .hero-decoration {
        top: -32%;
        width: 77.86vw;
        max-width: 292px;
    }

    .hero-copy .big {
        font-size: 38px;
    }

    .hero-copy .small {
        font-size: 30px;
    }

    .hero-copy .mid {
        font-size: 30px;
    }

    .hero-subcopy {
        font-size: 16px;
        line-height: 1.7;
    }

    .start-heading {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .start-section {
        padding-left: 15px;
        padding-right: 15px;
        margin-top: -300px;
    }

    .input-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .input-block {
        width: 100%;
        max-width: none;
        flex: 1 1 30px;
    }

    .question-label {
        font-size: 16px;
        width: 200px;
        padding: 6px 16px;
    }

    .gender-options {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }

    .gender-option {
        flex: 1 1 0;
        display: flex;
    }

    .gender-card {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 20px 10px;
        width: 100%;
        box-sizing: border-box;
        flex-direction: row;
    }

    .gender-img {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        object-fit: contain;
    }


    .gender-card span {
        font-size: 18px;
    }

    #mbti-select {
        height: 50px;
        font-size: 16px;
    }

    #start-button {
        font-size: 18px;
    }

    .start-section .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .start-section .start-character {
        width: 90%;
        top: -120px;
    }

    .start-option {
        font-size: 16px;
        padding: 16px;
        margin-bottom: 16px;
    }

    .start-select {
        gap: 1rem;
    }

    .character-section {
        padding: 3rem 1rem;
    }

    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}