/* Reset and Base Styles */
:root {
    /* ベースカラー */
    --text-dark: #323d4f;
    --text-gray: #6c757d;
    --main-bg: #fcfcf5;
    --white: #ffffff;
    --border-light: #e8e8e8;
    --shadow-light: rgba(0, 0, 0, 0.06);

    /* 男性向けカラー */
    --male-color: #89a4be;
    --male-color-dark: #6b87a4;

    /* 女性向けカラー */
    --female-color: #e6a4b4;
    --female-color-dark: #d18a9b;

    /* Fonts */
    --font-jp: "Noto Sans JP", "IBM Plex Sans JP", sans-serif;
    --font-logo: "Libre Baskerville", serif;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-jp);
    color: var(--text-dark);
    background-color: var(--main-bg);
    /* ▼▼▼【修正点】意図しないスクロール挙動を抑制 ▼▼▼ */
    overscroll-behavior: none;
}

/* ページ全体を画面に固定してスクロールを完全に無効化 */
.portal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ▼▼▼【最重要修正点】コンテナ自体のスクロールを無効化 ▼▼▼ */
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.4s ease-in;
}

.portal-box {
    width: 100%;
    max-width: 500px;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

.portal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.logo-mark {
    width: 35px;
    height: 35px;
}

.header-logo-text {
    font-family: var(--font-logo);
    font-style: italic;
    font-size: 1.5rem;
    color: #8c7f84;
    /* ロゴカラーは共通 */
}

.portal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.selection-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selection-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-light);
}

.selection-button.male {
    background-color: var(--male-color);
}

.selection-button.male:hover {
    background-color: var(--male-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(137, 164, 190, 0.3);
}

.selection-button.female {
    background-color: var(--female-color);
}

.selection-button.female:hover {
    background-color: var(--female-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 164, 180, 0.3);
}

.button-arrow {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.selection-button:hover .button-arrow {
    transform: translateX(5px);
}

.notice-box {
    margin-top: 2.5rem;
    padding: 1rem;
    background: #fcfcfc;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
}

.notice-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

@media (max-width: 620px) {
    .portal-box {
        padding: 2rem 1.5rem;
    }

    .portal-title {
        font-size: 1.2rem;
    }

    .selection-button {
        font-size: 1rem;
        padding: 1rem 1.2rem;
    }
}

/* 分かりやすいアニメーション */
@keyframes fadeAndSlideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
        /* 少し上にスライド */
    }
}

/* JavaScriptでこのクラスが付与されるとアニメーションが開始 */
.page-is-leaving .portal-container {
    animation: fadeAndSlideUp 0.4s ease-in forwards;
}