/* =========================
   基本設定
========================= */

body {
    font-family: "Noto Sans JP", sans-serif;
    color: #343434;
    padding-top: 100px;
    /* ヘッダー固定によるコンテンツ隠れ防止 */
    min-width: 375px;
}

html {
    overflow-x: hidden;
}

@media screen and (max-width: 767px) {
    body {
        padding-top: 130px;
    }
}

/* =========================
   共通レイアウト
========================= */

.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
    position: relative;
}

.flex {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
}

.row {
    display: flex;
    justify-content: space-between;
}

.section {
    padding: 60px 0;
}

.en {
    font-size: 40px;
    font-weight: 500;
    color: #3A9DE3;
    margin-bottom: 30px;
}

.text {
    font-size: 16px;
    line-height: 2;
}

.button {
    display: inline-block;
    border: 1px solid #eee;
    background-color: #f3f0e9;
    padding: 16px 40px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.3s, border-color 0.3s;
}

.button:hover {
    border-color: #3A9DE3;
    background-color: #fff;
}

/* =========================
   ヘッダー
========================= */

header {
    padding: 35px 0;
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.container.flex {
    max-width: 1140px;
    width: 90%;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ロゴ */
.logo {
    font-size: 24px;
    color: #3A9DE3;
    font-weight: 700;
    letter-spacing: -0.04em;
}

@media screen and (max-width: 767px) {
    .logo {
        font-size: 20px;
    }
}

/* メニュー */

.header_menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header_menu li {
    margin-left: 40px;
}

.header_menu li a {
    color: #343434;
    text-decoration: none;
    transition: color 0.4s;
    padding: 10px 0;
}

.header_menu li a:hover {
    color: #3A9DE3;
}

@media screen and (max-width: 767px) {
    .header_menu li {
        margin-left: 20px;
    }
}

/* =========================
   ハンバーガーメニュー・モバイル対応
========================= */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1100;
}

.hamburger span {
    display: block;
    height: 3px;
    background: #3A9DE3;
    border-radius: 2px;
}

.close-menu {
    background: none;
    border: none;
    color: #3A9DE3;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    display: none;
    z-index: 1200;
}

/* モバイル（1056px以下） */

@media screen and (max-width: 1056px) {
    .hamburger {
        display: flex;
    }

    nav {
        width: 100%;
        position: relative;
    }

    .header_menu {
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0);
        width: 300px;
        height: 100vh;
        position: fixed;
        top: 0;
        right: 0;
        padding: 120px 20px 20px;
        box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 1000;
        overflow-y: auto;
        transition:
            transform 0.6s ease,
            opacity 0.4s ease,
            visibility 0.4s ease,
            background-color 1.2s ease;
        /* フェード背景が必要なら残す */
    }

    .header_menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background-color: rgba(255, 255, 255, 1);
    }


    .header_menu ul {
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .header_menu li {
        margin: 15px 0;
        padding: 0;
        font-size: 18px;
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .header_menu.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .header_menu li a {
        display: block;
        padding: 10px 0;
        font-size: 16px;
        line-height: 1.4;
        color: #333;
    }
}


/* デスクトップ（1057px以上） */
@media screen and (min-width: 1057px) {
    nav {
        margin-left: auto;
        /* ← nav を右に寄せる */
    }

    .header_menu {
        flex-direction: row;
        background-color: transparent;
        position: static;
        width: auto;
        height: auto;
        box-shadow: none;
        transform: none;
        padding: 0;
    }

    .header_menu li {
        margin-left: 40px;
        padding: 0;
    }

    .header_menu li a {
        padding: 10px 0;
        color: #343434;
        text-decoration: none;
    }

    .hamburger,
    .close-menu {
        display: none !important;
    }
}





/* main */

#hero {
    background-image: url(../images/topc.jpeg);
    background-position: center;
    background-size: cover;
    height: 540px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    overflow: hidden;
    background-attachment: fixed;

}


#hero::before {
    content: '';
    width: 100%;
    height: 100%;
    background-color: #000;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.2;
    z-index: 1;
}


.hero_inner {
    z-index: 2;
    color: #fff;
    width: 100%;
    text-align: right;
    padding-right: 40px;
    /* ← 追加 */
}

.hero_inner p {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 16px;
}

.hero_inner h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

.circle-text {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 200px;
    height: 200px;
    z-index: 10;
}

.circle-text svg {
    width: 100%;
    height: 100%;
    animation: rotate 20s linear infinite;
}

.circle-text text {
    font-size: 12px;
    fill: white;
    /* テキストの色（お好みで） */
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


@media screen and (max-width: 767px) {
    .section {
        padding: 30px 0;
    }

    .en {
        font-size: 30px;
    }

    .row {
        flex-wrap: wrap;
        /* 臨機応変に縦並びにする */
    }

    .col {
        width: 100% !important;
    }

    #hero {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }
}




/* top-about */

#top-about {
    position: relative;
    overflow: hidden;
    height: 500px;
}

#top-about .en img {
    width: 50px;
    /* アイコンの幅 (必要に応じて調整) */
    height: 50px;
    /* アイコンの高さ (必要に応じて調整) */
    margin-right: 10px;
    /* アイコンと文字の間の余白 (必要に応じて調整) */
    vertical-align: middle;
    /* アイコンと文字を縦方向中央で揃える (必要に応じて調整) */
}

#top-about::before {
    content: 'nishitoko';
    position: absolute;
    top: 50%;
    right: -300px;
    transform: translateY(-50%);
    font-size: 260px;
    letter-spacing: -6px;
    color: #d3e7fa;
    font-weight: 900;
    z-index: -1;
    opacity: 0;
    transition: right 1.5s ease-out, opacity 1.5s ease-out;
}

#top-about.appeared::before {
    right: 50%;
    opacity: 1;
    transform: translateX(50%) translateY(-50%);
}

#top-about h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 40px;
}

#top-about .text {
    margin-bottom: 60px;
}

@media screen and (max-width: 767px) {
    #top-about::before {
        font-size: 80px;
        right: -150px;
    }

    #top-about.appeared::before {
        transform: translateX(50%) translateY(-50%);
    }

    #top-about h2 {
        font-size: 18px;
    }
}



@media screen and (max-width: 767px) {
    .section-divider {
        margin: 30px auto;
        /* モバイル版では余白を小さく */
        width: 90%;
        /* モバイル版では幅を広げる */
    }
}


/* hr */



@media screen and (max-width: 767px) {
    .section-divider {
        margin: 30px auto;
        /* モバイル版では余白を小さく */
        width: 90%;
        /* モバイル版では幅を広げる */
    }
}


.cp_hr12 {
    border: none;
    /* デフォルトの線を消す */
    margin: 20px auto;
    /* 上下の余白と中央揃え（余白はお好みで調整） */
    width: 80%;
    height: 3px;
    border-width: 0;
    background-repeat: repeat-x;
    background-size: 0.7em 0.3em, 1.7em 0.3em, 3.5em 0.3em, 3.7em 0.3em;
    background-position: right bottom;
    background-image:
        radial-gradient(0.3em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.5em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.8em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(7.2em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0));
}



/* top-goods */

#top-goods .en img {
    width: 50px;
    /* アイコンの幅 (必要に応じて調整) */
    height: 50px;
    /* アイコンの高さ (必要に応じて調整) */
    margin-right: 10px;
    /* アイコンと文字の間の余白 (必要に応じて調整) */
    vertical-align: middle;
    /* アイコンと文字を縦方向中央で揃える (必要に応じて調整) */
}

#top-goods h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 40px;
}

.scroll-section {
    padding-bottom: 100px;
}

.image-container {
    display: flex;
    flex-wrap: wrap;
    /* ← 追加で縦に折り返し */
    gap: 20px;
    justify-content: center;
    /* 中央揃え */
}


.scroll-image {
    width: 300px;
    /* ← ここを変更 */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}


.scroll-image.visible {
    opacity: 1;
    transform: translateY(0);
}




.product-item {
    text-align: center;
    width: 300px;
}

.product-name {
    font-weight: bold;
    font-size: 16px;
    margin-top: 20px;
    color: #333;
}

.product-description {
    font-size: 13px;
    color: #666;
    margin-top: 20px;
}


.scroll-image {
    width: 300px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.scroll-image.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-image.visible:hover {
    transform: translateY(0) scale(1.05);
    /* 上昇は済ませた状態で拡大 */
}



/* top-service */

#top-service .en img {
    width: 50px;
    /* アイコンの幅 (必要に応じて調整) */
    height: 50px;
    /* アイコンの高さ (必要に応じて調整) */
    margin-right: 10px;
    /* アイコンと文字の間の余白 (必要に応じて調整) */
    vertical-align: middle;
    /* アイコンと文字を縦方向中央で揃える (必要に応じて調整) */
}

#top-service {
    background-color: #d3e7fa;
    padding-top: 40px;
    padding-bottom: 100px;
}

.service-img {
    width: 50%;
    max-width: 300px;
    /* 必要なら最大幅を制限 */
    height: auto;
    /* アスペクト比を保つ */
    display: block;
    margin: 0 auto;
    /* 中央寄せ */
}




#top-service h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 40px;
}

#top-service .text {
    font-size: 16px;
}

.text .font-bold {
    font-weight: bold;
}

#top-service .row {
    display: flex;
    flex-wrap: wrap;
}

#top-service .col {
    padding: 10px;
    /* 適宜調整 */
}

#top-service .col:first-child {
    flex: 7;
}

#top-service .col:last-child {
    flex: 3;
    display: flex;
    align-items: flex-end;
    /* 下揃え */
    justify-content: center;
}


/* 初期状態（非表示で右にずらす） */
.slide-in-target {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1s ease-out;
}

/* 表示時の状態 */
.slide-in-visible {
    opacity: 1;
    transform: translateX(0);
}


@keyframes slideInRight {
    0% {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.slide-in {
    animation: slideInRight 3s ease-in-out;
    animation-fill-mode: forwards;
    /* アニメーション後の状態を維持 */
}

@media (max-width: 1056px) {
    #top-service .row {
        flex-direction: column;
    }

    #top-service .col {
        width: 100%;
    }

    #top-service .col:first-child,
    #top-service .col:last-child {
        flex: unset;
    }

    #top-service .col:last-child {
        margin-top: 30px;
        /* テキストと画像の間に余白 */
        align-items: center;
    }

    .service-img {
        width: 80%;
        max-width: 280px;
    }

    .slide-in-target {
        opacity: 0;
        transform: translateY(50px);
        /* 下から登場 */
        transition: all 1.2s ease-out;
    }

    .slide-in-visible {
        opacity: 1;
        transform: translateY(0);
    }
}


/* top map */

#top-map .en img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    vertical-align: middle;
}

#top-map h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.6;
}


/* セクション全体のレイアウト */

#top-map {

    background-size: cover;
    background-position: 50% 0;
    background-repeat: no-repeat;
    padding: 40px 0;
    position: relative;
}

#top-map .container {
    padding: 20px;

}

.map-address-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 30px;
    align-items: stretch;
    /* 各要素を同じ高さに */
    justify-content: flex-start;
    margin-top: 60px;
    /* 上の余白を追加 */
    margin-bottom: 60px;
    /* 下の余白を追加 */
}

.map-container {
    flex: 0 0 calc(50% - 15px);
    height: 300px;
    min-width: 300px;
}

.address-container {
    flex: 0 0 calc(50% - 15px);
    min-width: 300px;
    display: flex;
    /* ← 追加 */
    align-items: flex-end;
    /* ← 子要素を下寄せに */
    height: 300px;
}

.address-container .text {
    font-size: 1rem;
    line-height: 1.2;
}


.address-container .text span {
    display: block;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.6s ease-out forwards;

    line-height: 1.3;
    margin: 0;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


#top-map .row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /* 要素間のスペース */
}

@media screen and (max-width: 768px) {
    #top-map .row {
        flex-direction: column;
        /* 小さい画面では縦並びにする */
    }

    .map-container,
    .address-container {
        flex: 1 1 100%;
        /* 小さい画面では100%幅にする */
    }
}


/* top-question */


#top-question .en img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    vertical-align: middle;
}

/* 全体レイアウト */
#top-question {
    background: #fdfdfd;
    padding: 60px 20px;
}

#top-question h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 40px;
}



/* FAQリスト */
.faq-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 各項目のカード風スタイル */
.faq-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    padding: 20px 24px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.faq-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* 質問 */
.question {
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
}

/* 回答（初期は非表示） */
.answer {
    font-size: 16px;
    color: #3A9DE3;
    margin-top: 20px;
    /* ← ここでスペースの量を調整 */
    max-height: 200px;
    /* ある程度の高さを持たせる */
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    /* transition を追加 */
}

.faq-item:hover .answer {
    max-height: 200px;
    /* ある程度の高さを持たせる */
    opacity: 1;
}



/* cm */

.cp_hr1 {
    height: 3px;
    border-width: 0;
    background-repeat: repeat-x;
    background-size: 0.7em 0.3em, 1.7em 0.3em, 3.5em 0.3em, 3.7em 0.3em;
    background-position: right bottom;
    background-image:
        radial-gradient(0.3em 0.2em at center center, #94c79e, rgba(246, 89, 115, 0)),
        radial-gradient(0.5em 0.2em at center center, #94c79e, rgba(246, 89, 115, 0)),
        radial-gradient(0.8em 0.2em at center center, #94c79e, rgba(246, 89, 115, 0)),
        radial-gradient(7.2em 0.2em at center center, #94c79e, rgba(246, 89, 115, 0));
}

#top-cm .en img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    vertical-align: middle;
}

#top-cm h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 20px;
}

.cm-wrapper {
    position: relative;
    padding: 20px;
    margin: 30px 0 60px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 20px;
}

/* 上の線 */
.cm-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-repeat: repeat-x;
    background-size: 0.7em 0.3em, 1.7em 0.3em, 3.5em 0.3em, 3.7em 0.3em;
    background-image:
        radial-gradient(0.3em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.5em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.8em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(7.2em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0));
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* 下の線 */
.cm-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-repeat: repeat-x;
    background-size: 0.7em 0.3em, 1.7em 0.3em, 3.5em 0.3em, 3.7em 0.3em;
    background-image:
        radial-gradient(0.3em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.5em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.8em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(7.2em 0.2em at center center, #d3e7fa, rgba(246, 89, 115, 0));
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* 左の線 */
.cm-wrapper .border-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-repeat: repeat-y;
    background-size: 0.3em 0.7em, 0.3em 1.7em, 0.3em 3.5em, 0.3em 3.7em;
    background-image:
        radial-gradient(0.2em 0.3em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.2em 0.5em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.2em 0.8em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.2em 7.2em at center center, #d3e7fa, rgba(246, 89, 115, 0));
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

/* 右の線 */
.cm-wrapper .border-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background-repeat: repeat-y;
    background-size: 0.3em 0.7em, 0.3em 1.7em, 0.3em 3.5em, 0.3em 3.7em;
    background-image:
        radial-gradient(0.2em 0.3em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.2em 0.5em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.2em 0.8em at center center, #d3e7fa, rgba(246, 89, 115, 0)),
        radial-gradient(0.2em 7.2em at center center, #d3e7fa, rgba(246, 89, 115, 0));
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}




.cm-image {
    width: 60%;
    border-radius: 15px;
    display: block;
    margin: 0 auto;
}

.cm-container {
    flex: 0 0 calc(50% - 15px);
    min-width: 300px;
    /* ▼追加（または変更）ここから */
    display: flex;
    /* 中身にフレックスレイアウトを適用 */
    flex-direction: column;
    /* 縦並び */
    justify-content: center;
    /* 縦方向の中央寄せ */
    /* ▲ここまで */
}

.cm-container .text .span {
    font-size: 1rem;
    line-height: 2.0;
}


/* モバイル対応（縦並び） */



@media screen and (max-width: 768px) {
    .cm-wrapper {
        display: block !important;
        /* モバイルで要素を縦に並べるため */
        /* box-sizing はグローバル設定があれば不要 */
    }

    .cm-container {
        flex: none !important;
        /* フレックスアイテムとしての振る舞いを解除 */
        width: 100% !important;
        /* 横幅を100%に設定 */
        min-width: 0 !important;
        /* 最小幅の制限を解除 */
        /* box-sizing はグローバル設定があれば不要 */
        margin-bottom: 20px;
        /* 各要素の下に余白を追加 */
    }

    .cm-image {
        width: 100% !important;
        height: auto;
        /* 画像の縦横比を維持 */
    }
}





/*  footer */

.footer {
    padding: 200px 0;
    background-image: url(../images/milkbackb.png);
    background-size: cover;
    background-position: 50% 60%;
    background-repeat: no-repeat;
    text-align: center;
    font-size: 14px;
    letter-spacing: 0.05em;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.copyright {
    font-size: 13px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding-bottom: 0;
    margin-top: 0;
}

.footer-overlay-image {
    width: 100px;
    height: 100px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(50% + 20px);
    /* コピーライトの中央から20px下 */
    z-index: 1;
    object-fit: contain;
}


@keyframes roll-in {
    0% {
        transform: translate(-300%, -200%) rotate(0deg);
        opacity: 0;
    }

    60% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 0) rotate(720deg);
        opacity: 1;
    }
}

.footer-overlay-image.animate-roll {
    animation: roll-in 3s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}




/* トップに戻るボタン */



.pagetop {
    position: fixed;
    bottom: 250px;
    right: 60px;
    z-index: 999;
    text-align: center;
    display: none;
}

.pagetop .text-vertical {
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    white-space: nowrap;
}

.pagetop a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
    width: 60px;
    /* 幅を広げる */
    height: 140px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;

    padding: 5px;
}

.pagetop a:hover {
    background-color: #fff;
    color: #3a9de3;
}

.pagetop .arrow-left {
    font-size: 18px;
    margin-bottom: 2px;
    /* 矢印とテキストの間隔 */
    margin-right: 0;
    /* 不要になった右マージンを削除 */
}

.pagetop .text-vertical {
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    /* 縦書きを維持 */
}