/* =============================================
   リセット & ベース設定
   ============================================= */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Zen Maru Gothic', sans-serif;
    background-color: #222;
    -webkit-font-smoothing: antialiased;
}

.fv {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    overflow: hidden;
    background-color: #fff;
}

/* 背景スライドショーの設定（3枚Ver） */
.fv-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background-color: #000;
}
.bg-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center top;
    opacity: 0;
    animation: bgFade3 15s infinite;
}
.bg1 { background-image: url('../images/top01.webp'); }
.bg2 { background-image: url('../images/top02.webp'); animation-delay: 5s; }
.bg3 { background-image: url('../images/top03.webp'); animation-delay: 10s; }

@keyframes bgFade3 {
    0%   { opacity: 0; }
    6.6% { opacity: 1; }
    33.3%{ opacity: 1; }
    40%  { opacity: 0; }
    100% { opacity: 0; }
}

.fv-content {
    position: relative;
    z-index: 2;
    height: 100%;
    width: 100%;
}

/* 1. ロゴ */
.top-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 130px;
}
.top-logo img {
    width: 200%;
    margin-left: -50px;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 2. キャッチコピー */
.copy-area {
    position: absolute;
    top: 5%;
    right: 5%;
    transform: rotate(-12deg);
    transform-origin: center center;
}
.copy-line {
    display: inline-block;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.3;
    color: #fff;
    text-shadow: 
        3px 0 0 #F68B3E, -3px 0 0 #F68B3E,
        0 3px 0 #F68B3E, 0 -3px 0 #F68B3E,
        2px 2px 0 #F68B3E, -2px -2px 0 #F68B3E,
        2px -2px 0 #F68B3E, -2px 2px 0 #F68B3E,
        0 5px 15px rgba(0,0,0,0.2);
}
.line-2 {
    margin-left: 2.5rem;
    margin-top: 5px;
}

/* 3. メニュー（利用規約・プライバシー） */
.top-menu-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.menu-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.menu-panel {
    position: absolute;
    top: 50px; /* ボタンのすぐ下 */
    right: 0;  /* ボタンの右端に揃える (画面外に出ない) */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    display: none;
    flex-direction: column;
    z-index: 101;
    min-width: 180px; /* 押しやすい幅に */
    white-space: nowrap; /* 改行防止 */
}

.menu-panel.is-open {
    display: flex;
}

.menu-panel a {
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

.menu-panel a:last-child {
    border-bottom: none;
}
.menu-panel.is-open { display: flex; }

/* 4. スタンプ */
.badge-wrapper {
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
}
.badge-stamp {
    background-color: #F68B3E;
    width: 160px; height: 160px;
    border-radius: 50%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: #fff; border: 2px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: rotate(-10deg);
}
.badge-sub { font-size: 0.9rem; font-weight: bold; margin: 0; margin-bottom: 2px; }
.badge-main { text-align: center; line-height: 1; }
.badge-label { font-size: 0.9rem; font-weight: bold; margin: 0; }
.badge-number { font-size: 2.4rem; font-weight: 900; letter-spacing: -2px; margin: 0; }
.unit { font-size: 1.2rem; color: #FF3333; margin-left: 2px; -webkit-text-stroke: 1px #fff; }
.badge-bottom { font-size: 1.5rem; font-weight: 900; margin: 0; margin-top: 2px; }

/* 5. ボタン & 誘導テキスト */
.cta-area {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
}
.cta-lead {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1;
    text-shadow: 
        2px 0 0 #000, -2px 0 0 #000,
        0 2px 0 #000, 0 -2px 0 #000,
        1px 1px 0 #000, -1px -1px 0 #000,
        1px -1px 0 #000, -1px 1px 0 #000;
}
.text-jj {
    font-family: 'Arial Black', sans-serif;
    color: #FF9D52;
    font-size: 2rem;
    margin-left: 5px;
    display: inline-block;
    transform: translateY(-4px);
    filter: drop-shadow(0 0 5px rgba(255, 157, 82, 0.8));
}
.btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 18px 0;
    background: linear-gradient(180deg, #F9C1FF 0%, #E88AFF 100%);
    color: #000;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 900;
    border: 4px solid #000;
    border-radius: 50px;
    box-shadow: 0 5px 0 #000;
}
.arrow { margin-left: 15px; font-size: 1.4rem; }

/* スマホ調整 */
@media (max-width: 400px) {
    .copy-line { font-size: 1.8rem; }
    .badge-stamp { width: 140px; height: 140px; }
    .badge-number { font-size: 2rem; }
    .btn-primary { font-size: 1.5rem; padding: 15px 0; }
    .cta-lead { font-size: 1.0rem; }
    .text-jj { font-size: 1.3rem; }
}

/* =============================================
   規約オーバーレイ（ポップアップ）
   ============================================= */
.policy-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); /* 背景を暗く */
    display: none; /* 通常は非表示 */
    justify-content: center;
    align-items: center;
    z-index: 2000; /* メニューより上に表示 */
    padding: 20px;
    box-sizing: border-box;
}

.policy-overlay.is-open {
    display: flex;
}

.policy-window {
    background: #fff;
    width: 100%;
    max-width: 460px; /* FVの幅に合わせる */
    height: 80vh;
    border-radius: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: zoomIn 0.2s ease-out;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 規約モーダル本体 */
.policy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none; /* 通常は非表示 */
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}

/* 表示時 */
.policy-overlay.is-open {
    display: flex;
}

/* 中身の白い箱 */
.policy-bubble {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    background: #fff;
    border-radius: 18px;
    padding: 30px 20px 20px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 閉じるボタン */
.policy-close {
    position: absolute;
    top: 10%;
    right: 15px;
    background: #eee;
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* --- フッターコピーライト --- */
.fv-footer {
    position: absolute;
    bottom: 10px; /* 画面の一番下から少し浮かす */
    width: 100%;
    text-align: center;
    z-index: 5;
}

.fv-footer p {
    color: rgba(255, 255, 255, 0.6); /* 白すぎると目立ちすぎるので少し透過 */
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* 背景が明るくても読めるように */
}

/* スマホでの微調整 */
@media (max-width: 400px) {
    .fv-footer {
        bottom: 5px;
    }
    .fv-footer p {
        font-size: 0.7rem;
    }
}