/*
 * © 2026 Thirlays Candle. All rights reserved.
 * このコードの無断複製・転用を禁じます。
 *
 * 女神の道LP の見た目
 *
 * もくじ
 *   0.  フォント
 *   1.  基本設定
 *   2.  タイトル・キャッチコピー
 *   3.  タイピング演出①
 *   4.  活動内容カード ①②③
 *   5.  カップの挿絵
 *   6.  3つの円
 *   7.  ツインブロック
 *   8.  タイピング演出②
 *   9.  ツインサークル
 *   10. 締めくくりメッセージ
 *   11. 申し込みボタン
 *   12. 案内妖精
 *   13. 背景のお花
 *   14. アニメーション（共通）
 *   15. 申し込みボタン周りのバラ園
 *   16. スマホ用（767px以下）
 *   17. PC用（768px以上）
 *   18. タイピングの妖精カーソル
 *   19. 申し込みボタンのバラ舞い上がり
 *   20. キャンドル点火
 *   21. 締めくくりメッセージのきらめき
 *   22. オープニング：白いバラのカーテン
 *   23. PC／スマホの文字出し分け
 *   24. 背景の六芒星
 *   25. カップの挿絵の位置調整
 *
 * ※画像のパスはこのCSSファイルの場所（assets/css/）から見た位置です。
 */


/* ==========================================================================
   0. フォント
   ========================================================================== */
@font-face {
    font-family: 'kazukiReiwa-Regular';
    src: url('../fonts/kazukiReiwa-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body, h1, h2, h3, h4, p, a, span, div {
    font-family: 'kazukiReiwa-Regular', 'YuMincho', '游明朝', serif !important;
}


/* ==========================================================================
   1. 基本設定
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #C7D6E8; /* ブルーグレー（バラのカーテン後の背景色。script.js にも同じ色あり） */
    color: #4a3b32;            /* 優しいココアブラウン */
    overflow-x: hidden;
    position: relative;
}

.lp-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 2; /* コンテンツは前面 */
}


/* ==========================================================================
   2. タイトル・キャッチコピー
   ========================================================================== */
.main-title img {
    max-width: 100%;
    width: 600px;
    height: auto;
    margin-bottom: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.lp-content p {
    font-size: 22px;
    line-height: 1.8;
    margin: 24px 0;
}

.catch-copy {
    margin-top: 30px !important;  /* 数値を大きくするほどタイトル画像から離れる */
    font-size: 19px;
    font-weight: bold;
    color: #F6F4EA;
    text-align: inherit;
}


/* ==========================================================================
   3. タイピング演出①
   ========================================================================== */
.typing-box {
    background-color: #F6F4EA;    /* アイリッシュホワイト */
    border: 2px solid #E7CDE0;
    border-radius: 12px;
    padding: 40px 20px;
    margin: 60px auto;
    max-width: 700px;
    min-height: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 6px 20px rgba(167, 164, 224, 0.25);
}

.typing-main-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 15px;
}

#typing-text {
    font-size: 38px;
    font-weight: bold;
    line-height: 2.0;
    color: #C7D6E8;
    margin: 0 0 0 55px;     /* 妖精カーソルが消えた後に文章が中央に来るよう右へ寄せる */
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    white-space: pre-line;  /* 文章の \n を改行として表示 */
}

.typing-sub-text {
    font-size: 21.5px !important;
    color: #6b5649;
    line-height: 1.6;
    margin: 0;
    padding-top: 10px;
    border-top: 1px dashed #909fcc;
    display: inline-block;
    max-width: 90%;
}


/* ==========================================================================
   4. 活動内容カード ①②③
   ========================================================================== */
.content-services {
    margin: 60px auto;
    max-width: 700px;
    padding: 0 10px;
}

/* カード全体（上120pxがストライプ、下が青） */
.content-card {
    background: repeating-linear-gradient(90deg, #C7D6E8 0px, #C7D6E8 24px, #F6F4EA 24px, #F6F4EA 48px) top / 100% 120px no-repeat,
        #8ea7e6
        !important;
    border-radius: 16px;
    margin-bottom: 35px;
    box-shadow: 0 8px 24px rgba(224, 164, 178, 0.15);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.content-card:hover {
    transform: translateY(-3px);
}

/* 上のストライプ部分（見出し） */
.card-lead-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0px;
    padding: 0 30px;
    height: 120px !important;  /* 固定の高さで上下の余白をそろえる */
    position: relative;
    z-index: 5;
    width: 100%;
    box-sizing: border-box;
}

.content-card .card-text .card-lead {
    font-size: 25px !important;
    background-color: transparent !important;
    color: #6b5d49 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.1;
    font-weight: bold;
    flex: 1;
}

.cup-mikoshi-container,
.flower-animation-container {
    flex-shrink: 0;
}

/* PC画面だけ：①②③の数字をストライプの上にはみ出させる */
@media screen and (min-width: 769px) {
    .number-prefix {
        position: absolute;
        top: -60px;
        left: 30px;
        font-size: 1.5em;
        color: #6b5d49;
        z-index: 10;
    }

    .card-lead-row {
        align-items: center !important;
    }

    .content-card .card-text .card-lead {
        margin-top: 0 !important;
        line-height: 1.4 !important;
        transform: translateY(-8px); /* フォントの偏り分だけ上に引き上げる */
    }
}

/* 下の青い部分（本文） */
.card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: transparent !important;
    position: relative;
    z-index: 4;
}

.card-text p {
    background-color: transparent !important;
    padding: 25px 30px 45px 30px;
    margin: 0 !important;
    box-sizing: border-box;
    font-size: 19px !important;
    color: #f2ede3 !important;
    line-height: 1.7;
}


/* ==========================================================================
   5. カップの挿絵（3つのカップ・お花が回るカップ）
   ========================================================================== */
.cup-mikoshi-container {
    position: relative;
    width: 140px;
    height: 130px;
    min-width: 140px;
    margin-left: 0px;
}

.cup-position-wrapper {
    position: absolute;
    top: 40%;
    left: 50%;
    width: 0;
    height: 0;
}

.cup-pos-1 { transform: translate(-50%, -50%) translate(0px,-36px); }
.cup-pos-2 { transform: translate(-50%, -50%) translate(-40px, 26px); }
.cup-pos-3 { transform: translate(-50%, -50%) translate(40px, 26px); }

.mikoshi-cup {
    width: 64px;
    height: auto;
    object-fit: contain;
    display: block;
    transform-origin: center;
}

.flower-animation-container {
    position: relative;
    width: 80px;
    height: 80px;
    min-width: 80px;
    display: block;
    margin-left: 10px;
}

.center-cup {
    width: 80px;
    height: auto;
    position: absolute;
    top: 70%;
    left: -50px;
    transform: translate(-50%, -50%);
    object-fit: contain;
    z-index: 1;
}

.orbit-flower-wrapper {
    position: absolute;
    width: 40px;
    height: 28px;
    top: 48%;
    left: 60px;
    z-index: 2;
    animation: hanafuda-rotate 6s linear infinite;
}

.orbit-flower {
    width: 100%;
    height: auto;
    display: block;
}


/* ==========================================================================
   6. 3つの円
   ========================================================================== */
.circle-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 60px 0;
    padding: 0 10px;
}

.circle-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.circle-image {
    width: 100%;
    max-width: 230px;
    position: relative;
}

.circle-image img {
    width: 100%;
    height: auto;
    display: block;
}

.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 0;
    background-color: transparent;
    padding: 0;
    width: 80%;
    z-index: 10;
}

.circle-text h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #87774a;
    text-align: center;
}

.circle-text p {
    margin: 8px 0 0 0;
    font-size: 13px !important;
    line-height: 1.4;
    text-align: center;
}


/* ==========================================================================
   7. ツインブロック
   ========================================================================== */
.twin-block-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin: 80px auto;
    max-width: 750px;
    padding: 0 10px;
}

.twin-block-item {
    flex: 1;
    position: relative;
}

.twin-block-inner {
    background-color: #f6f5f2;
    border-radius: 20px;
    padding: 25px 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(224, 164, 178, 0.12);
    border: 2px solid #8ea7e6;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.twin-block-inner:hover {
    transform: translateY(-4px);
}

.twin-block-inner h3 {
    font-size: 14.5px;
    color: #6b5649;
    line-height: 1.6;
    margin: 0;
    font-weight: bold;
    text-align: center;
}


/* ==========================================================================
   8. タイピング演出②（キャンドルにはさまれた文章）
   ========================================================================== */
.typing-box-2 {
    margin: 120px auto 80px;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.typing-main-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    vertical-align: middle;
}

.typing-main-row-2 {
    text-align: center;
    position: relative;
    vertical-align: middle;
    display: flex;
    justify-content: center;
    width: 100%;
}

#typing-text-2 {
    font-size: 21px;
    font-weight: bold;
    line-height: 1.8;
    color: #F6F4EA;
    margin: 0 0 0 55px;     /* 妖精カーソルが消えた後に文章が中央に来るよう右へ寄せる */
    display: inline-block;
    text-align: center;
    white-space: pre-line;
}


/* ==========================================================================
   9. ツインサークル
   ========================================================================== */
.twin-circle-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 80px auto;
    max-width: 750px;
    padding: 0 10px;
}

.twin-circle-item {
    flex: 1;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.twin-circle-image img {
    width: 100%;
    height: auto;
    display: block;
}

.twin-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 0;
    background-color: transparent;
    padding: 0;
    width: 85%;
    z-index: 10;
}

.twin-circle-text h3 {
    margin: 0;
    font-size: 18px;
    color: #6b5649;
    line-height: 1.6;
    font-weight: bold;
    text-align: center;
}


/* ==========================================================================
   10. 締めくくりメッセージ
   ========================================================================== */
.closing-message-zone {
    background-image: none !important;
    background: rgba(246, 244, 234, 0.85) !important;
    border: 2px solid #E7CDE0 !important;
    border-radius: 32px !important;
    padding: 0px 10px !important;
    margin: 80px auto 20px !important;
    max-width: 700px !important;
    text-align: center;
    box-shadow: 0 8px 32px rgba(199, 214, 232, 0.4) !important;
    position: relative;
    box-sizing: border-box;
}

.closing-message-zone h2 {
    font-size: 22px;
    color: #6b5649;
    line-height: 2.5;
    margin: 0;
    font-weight: bold;
}


/* ==========================================================================
   11. 申し込みボタン
   ========================================================================== */
.action-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 100px;
}

.main-button img {
    max-width: 240px;
    height: auto;
    transition: transform 0.3s;
}

.main-button img:hover {
    transform: scale(1.05);
}


/* ==========================================================================
   12. 案内妖精（右下でふわふわ）
   ========================================================================== */
#scrolling-fairy {
    position: fixed;
    bottom: 35%;
    right: 5%;
    width: 120px !important;
    height: 120px !important;
    z-index: 1000;
    cursor: pointer;
    text-decoration: none;
    display: block !important;
    animation: fairy-hovering 2.6s ease-in-out infinite; /* 2.6秒周期で上下にふんわり */
}

#scrolling-fairy img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

@keyframes fairy-hovering {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-8px); } /* 一番上で8px浮き上がる */
    100% { transform: translateY(0); }
}


/* ==========================================================================
   13. 背景のお花（画面を流れる3輪）
   ========================================================================== */
.flower-background-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
    overflow: hidden;
    display: block !important;
}

.bg-flower-step1,
.bg-flower-step2,
.bg-flower-step3 {
    position: absolute;
    width: 130px !important;
    height: auto !important;
    display: block !important;
    opacity: 0.8;
}

.bg-flower-step1 {
    top: 20%;
    left: -50px;
    animation: flow-left-to-right 12s ease-in-out infinite;
}

.bg-flower-step2 {
    left: -50px;
    top: 10%;
    animation: flow-diagonal 14s ease-in-out infinite;
}

.bg-flower-step3 {
    right: 150px;
    top: -50px;
    animation: flow-snowball 10s linear infinite;
}


/* ==========================================================================
   14. アニメーション（共通）
   ========================================================================== */
@keyframes flow-left-to-right {
    0%   { left: -50px; transform: translateY(0) rotate(0deg); }
    30%  { transform: translateY(-30px) rotate(120deg); }
    70%  { transform: translateY(30px) rotate(240deg); }
    100% { left: calc(100% + 50px); transform: translateY(0) rotate(360deg); }
}

@keyframes flow-diagonal {
    0%   { left: -50px; top: 10%; transform: rotate(0deg); }
    100% { left: calc(100% + 50px); top: 80%; transform: rotate(360deg); }
}

@keyframes flow-snowball {
    0%   { top: -50px; transform: rotate(0deg); }
    30%  { top: 30%; transform: rotate(90deg); }
    40%  { top: 40%; transform: rotate(450deg); }
    50%  { top: 50%; transform: rotate(810deg); }
    100% { top: calc(100vh + 50px); transform: rotate(990deg); }
}

@keyframes hanafuda-rotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes roseDrift {
    0%   { transform: translateY(0px) rotate(0deg); }
    25%  { transform: translateY(-8px) rotate(90deg); }
    50%  { transform: translateY(-4px) rotate(180deg); }
    75%  { transform: translateY(-10px) rotate(270deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

/* 申し込みボタンのバラが舞う舞台 */
#butterfly-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}


/* ==========================================================================
   15. 申し込みボタン周りのバラ園
   ========================================================================== */
.rose-garden-container {
    position: relative;
    max-width: 500px;
    margin: -40px auto 120px auto;
    padding: 40px;
}

.rose-bouquet-top-left {
    position: absolute;
    top: -20px;
    left: -30px;
    width: 170px;
    height: auto;
    z-index: 5;
}

.rose-bouquet-bottom-right {
    position: absolute;
    bottom: 35px;
    right: 10px;
    width: 100px;
    height: auto;
    transform: rotate(250deg);
    z-index: 2;
}

.rose-cluster {
    position: absolute;
    width: 60px;
    height: auto;
    z-index: 1;
}
.cluster-1 { top: -50px; right: 10px; }
.cluster-2 { bottom: -5px; left: -5px; }

.rotating-rose {
    position: absolute;
    z-index: 5;
    animation: roseDrift 6s ease-in-out infinite;
}

.white-rose-1 { top: 80px;    left: -60px;  width: 60px; animation-delay: 0s; }
.white-rose-2 { bottom: 90px; right: -50px; width: 50px; animation-delay: 1.2s; }
.white-rose-3 { top: 30px;    left: 50px;   width: 28px; animation-delay: 2.4s; }

.pink-rose-1  { bottom: 20px; left: 120px;  width: 45px; animation-delay: 0.6s; }
.pink-rose-2  { top: 200px;   right: -60px; width: 32px; animation-delay: 1.8s; }
.pink-rose-3  { bottom: 60px; left: 75px;   width: 38px; animation-delay: 3.0s; }


/* ==========================================================================
   16. スマホ用（画面幅767px以下）
   ========================================================================== */
@media screen and (max-width: 767px) {

    /* --- 案内妖精 --- */
    #scrolling-fairy {
        width: 75px !important;
        height: 75px !important;
        bottom: 25% !important;
    }

    /* --- キャッチコピー --- */
    .catch-copy {
        text-align: center !important;
        line-height: 1.9 !important;
        font-size: 1.1rem !important;
        display: block;
        width: 100%;
    }

    /* --- ツインサークル --- */
    .twin-circle-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin: 40px auto;
    }
    .twin-circle-item {
        width: 100%;
        max-width: 240px;
        margin: 0 auto;
        position: relative;
    }
    .twin-circle-text h3 {
        text-align: center !important;
        line-height: 1.6 !important;
        font-size: 15px !important;
    }

    /* --- 締めくくりメッセージ --- */
    .closing-message-zone {
        background-image: none !important;
        background: rgba(246, 244, 234, 0.85) !important;
        border: 2px solid #E7CDE0 !important;
        border-radius: 32px !important;
        padding: 35px 20px !important;
        margin: 50px 15px !important;
        max-width: 90vw !important;
        text-align: center;
        box-shadow: 0 8px 32px rgba(199, 214, 232, 0.4) !important;
        position: relative;
        box-sizing: border-box;
    }
    .closing-message-zone h2 {
        position: relative;
        z-index: 2;
        font-size: clamp(1rem, 4.5vw, 1.3rem) !important;
        line-height: 1.7 !important;
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* --- タイピング演出①② --- */
    .typing-box {
        padding: 25px 20px;
        margin: 40px 24px;
    }
    #typing-text {
        font-size: 16.5px;
        margin: 0 !important;
        text-align: center !important;
    }
    .typing-sub-text {
        font-size: 14.5px !important;
        padding-top: 8px;
        line-height: 1.5;
        text-align: center;
    }
    #typing-text-2 {
        margin: 0 !important;
        text-align: center !important;
    }
    .cursor-hidden {
        width: 0 !important;
        margin-left: 0 !important;
    }

    /* --- 3つの円 --- */
    .circle-container {
        flex-direction: column;
        gap: 30px;
        margin: 40px 0;
        align-items: center;
    }
    .circle-item {
        width: 100%;
        max-width: 240px;
        margin: 0 auto;
    }
    .circle-text h3 { font-size: 18px !important; }
    .circle-text p { font-size: 13.5px !important; }

    /* --- 活動内容カード --- */
    .content-services {
        padding: 0 24px;  /* タイピング演出①と同じ幅にそろえる */
    }
    .content-card {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 0;
        background:
            repeating-linear-gradient(90deg, #C7D6E8 0px, #C7D6E8 24px, #F6F4EA 24px, #F6F4EA 48px) top / 100% 100px no-repeat,
            #8ea7e6
            !important;
        overflow: visible !important;
        background-clip: padding-box !important;
    }
    .number-prefix {
        position: absolute;
        top: 30px;
        left: 12px;
        font-size: 2.2em;
        color: #6b5d49;
        z-index: 10;
        margin-right: 0;
    }
    .card-number {
        position: absolute;
        top: 100px;
        left: 5px;
        font-size: 30px !important;
        color: #6b5d49 !important;
        z-index: 10;
        line-height: 1;
    }
    .card-lead-row {
        height: 100px !important;
        min-height: 100px !important;
        padding: 0 20px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    .content-card .card-text .card-lead {
        font-size: 14px !important;
        line-height: 1.45 !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        text-align: center !important;
        margin: 0 !important;
        padding-right: 0px !important;
        flex: 1 1 0% !important;
        min-width: 0 !important;
    }
    .card-text,
    .card-text p {
        font-size: 13px !important;
        color: #f2ede3 !important;
    }

    /* --- カップの挿絵 --- */
    .center-cup {
        width: 50px !important;
    }
    .cup-mikoshi-container {
        width: 40px !important;
        height: 50px !important;
        min-width: 40px !important;
        margin-left: 0 !important;
    }
    .flower-animation-container {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }
    .mikoshi-cup {
        width: 40px;
    }

    /* --- ツインブロック --- */
    .twin-block-container {
        flex-direction: column;
        gap: 30px;
        margin: 50px 15px;
    }
    .twin-block-inner {
        padding: 35px 25px;
    }

    /* --- タイピング演出②・キャンドル --- */
    .typing-box-2 {
        padding: 30px 15px;
        width: 100%;
    }
    .typing-main-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .typing-main-row-2 {
        width: 100%;
        text-align: center;
        font-size: 1rem;
        line-height: 1.7;
        word-break: break-all;
        padding: 0 10px;
    }
    .candle-wrapper {
        width: 45px !important;
    }

    /* --- 申し込みボタン --- */
    .action-section {
        margin-top: 30px;
        margin-bottom: 50px;
    }

    /* --- 背景のお花を少し大きく --- */
    .flower-background-stage {
        transform: scale(1.3);
        transform-origin: center center;
    }
}


/* ==========================================================================
   17. PC用（画面幅768px以上）
   ========================================================================== */
@media screen and (min-width: 768px) {
    .typing-main-row-2 {
        max-width: 580px !important;
        width: 100% !important;
        display: inline-block !important;
        white-space: normal !important;
        word-break: keep-all !important;
    }
}


/* ==========================================================================
   18. タイピングの妖精カーソル（文章の後ろにいて、終わると消える）
   ========================================================================== */
.typing-cursor,
.typing-cursor-2 {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    width: 55px;
    height: 55px;
    background: url('../images/fairies/fairie-muki/hidari.webp') no-repeat center center;
    background-size: contain;
    opacity: 1;
    visibility: visible;
    transition: opacity 1.8s ease, visibility 1.8s ease;
}

.cursor-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}


/* ==========================================================================
   19. 申し込みボタンのバラ舞い上がり
   ========================================================================== */
.rose-burst-petal {
    position: fixed;
    top: 0;
    left: 0;
    width: 50px;
    height: auto;
    pointer-events: none;
    z-index: 10000;
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
    animation: roseBurstRise 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes roseBurstRise {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translate(0, 0) scale(0.6) rotate(0deg);
    }
    5% {   /* 一瞬で大きくなりつつ移動開始 */
        opacity: 1;
        transform: translate(-50%, -50%) translate(calc(var(--tx) * 0.05), calc(var(--ty) * 0.05)) scale(var(--burst-scale)) rotate(0deg);
    }
    80% {  /* 大きさを保ったまま散らばる位置へ */
        opacity: 1;
        transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(var(--burst-scale)) rotate(var(--rot));
    }
    100% { /* 最後にフェードアウト */
        opacity: 0;
        transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(var(--burst-scale)) rotate(var(--rot));
    }
}


/* ==========================================================================
   20. キャンドル点火（タイピング②が終わると灯る）
   ========================================================================== */
.candle-wrapper {
    position: relative;
    width: 100px;
    height: auto;
    display: inline-block;
    align-self: center;
}

.candle-base {
    width: 100%;
    height: auto;
    display: block;
}

/* 最初は炎を隠しておく */
.candle-fire {
    position: absolute;
    top: -22px;     /* 芯の真上に来るよう微調整 */
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 150%;
    height: auto;
    opacity: 0;
    mix-blend-mode: screen;
    pointer-events: none;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out; /* 0.5秒でふわっと灯る */
}

#candle-trigger-wrap.is-lit .candle-fire {
    opacity: 1 !important;
    transform: translateX(-50%) scale(1);
    z-index: 10;
    animation: candleWobble 2.5s ease-in-out infinite; /* 灯った後ゆらゆら */
}

@keyframes candleWobble {
    0%   { transform: translateX(-50%) scale(1) rotate(0deg); }
    50%  { transform: translateX(-48%) scale(1.02) rotate(2deg); }
    100% { transform: translateX(-50%) scale(1) rotate(0deg); }
}


/* ==========================================================================
   21. 締めくくりメッセージのきらめき（1秒キラッ）
   ========================================================================== */
.closing-message-zone h2 span {
    display: inline-block;
    position: relative;
    color: #504d3c;
    background: linear-gradient(
        110deg,
        #504d3c 35%,
        #fff7a3 50%,
        #504d3c 65%
    );
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: #504d3c;
    transition: color 0.5s;
}

.closing-message-zone h2 span.is-shine {
    animation: textShineOneSecond 1.0s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes textShineOneSecond {
    0% {
        background-position: 100% 0;
        -webkit-text-fill-color: transparent;
    }
    99% {
        -webkit-text-fill-color: transparent;
    }
    100% {
        background-position: -100% 0;
        -webkit-text-fill-color: #504d3c;
    }
}


/* ==========================================================================
   22. オープニング：白いバラのカーテン ＆ 中央の妖精
   ========================================================================== */
#rose-curtain-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;           /* 一番手前 */
    background-color: #c7d4df;
    pointer-events: auto;
    overflow: hidden;
    transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}

/* 敷き詰められる小さな白バラ */
.single-curtain-rose {
    position: absolute;
    width: 80px;
    height: auto;
    object-fit: contain;
    opacity: 1;
    user-select: none;
    -webkit-user-drag: none;
}

/* タップ後に舞い上がる */
.single-curtain-rose.climb-up {
    animation: roseAscent var(--rose-speed, 2.5s) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes roseAscent {
    0% {
        transform: translateY(0) rotate(0deg) scale(var(--rose-scale, 1));
        opacity: 1;
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: translateY(-135vh) rotate(var(--rose-rot, 360deg)) scale(var(--rose-scale, 1));
        opacity: 0;
    }
}

/* カーテンが消えた状態 */
#rose-curtain-layer.curtain-gone {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* カーテン中央でふわふわする妖精 */
.curtain-center-fairy {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: auto;
    z-index: 1000000;
    pointer-events: none;      /* タップは後ろのカーテンへ通す */
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15));
    animation: curtainFairyHover 3.5s ease-in-out infinite;
    transition: opacity 1.0s ease-in-out;
}

@keyframes curtainFairyHover {
    0%   { transform: translate(-50%, -50%) translateY(0px); }
    50%  { transform: translate(-50%, -50%) translateY(12px); }
    100% { transform: translate(-50%, -50%) translateY(0px); }
}

#rose-curtain-layer.curtain-gone .curtain-center-fairy {
    opacity: 0;
}


/* ==========================================================================
   23. PC／スマホの文字出し分け
       HTMLで class="pc-only" はPCだけ、class="sp-only" はスマホだけ表示
   ========================================================================== */
.pc-only {
    display: none !important;
}
.sp-only {
    display: inline-block !important;
}

@media screen and (min-width: 768px) {
    .pc-only {
        display: inline-block !important;
    }
    .sp-only {
        display: none !important;
    }
}


/* ==========================================================================
   24. 背景の六芒星（花火のように咲いて消える）
   ========================================================================== */
.firework-hex {
    position: absolute;
    z-index: 5;            /* カードより上、文字より下 */
    pointer-events: none;
    height: auto;
    opacity: 0;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
    animation-name: hexFireworkTimeline;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

@keyframes hexFireworkTimeline {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(var(--initial-rot));
    }
    25% {   /* ふわっと開く */
        opacity: 0.35;
        transform: scale(1) rotate(var(--initial-rot));
    }
    65% {   /* うっすらのまま回る */
        opacity: 0.35;
    }
    100% {  /* 回りながら溶けるように消える */
        opacity: 0;
        transform: scale(1.05) rotate(var(--final-rot));
    }
}


/* ==========================================================================
   25. カップの挿絵の位置調整（カード③とツインブロックの間）
   ========================================================================== */
.between-card-cups {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin: 20px auto 40px;
    max-width: 700px;
    padding: 0 10px;
    position: relative;
    height: 100px;
}

.between-card-cups .cup-mikoshi-container {
    position: relative;
    width: 140px;
    height: 130px;
    min-width: 140px;
    margin-left: 0;
}

.between-card-cups .cup-position-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}

.between-card-cups .flower-animation-container {
    position: relative;
    width: 80px;
    height: 80px;
    min-width: 80px;
    margin-left: 0;
}
