/* --- [01. 基礎設定] 背景ベージュ(#f5f5f0)と文字色(#2d2d2d)を固定 --- */
/* ページ全体の土台となる背景色、標準の文字色、フォントの種類を設定します */
body {
    margin: 0; padding: 0;
    background-color: #f5f5f0;
    color: #2d2d2d;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    position: relative;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

/* --- [02. 質感ノイズ] 全体に微細な質感を付与 --- */
/* SVGフィルターを使用して、紙のようなわずかなザラつきを画面全体に被せます */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9998;
}

/* --- [ヒーロー画像に重ねるヘッダー部分] --- */
/* パンくず＋タイトルを画像の上に絶対配置で重ね、通常フローの高さに影響させないようにします */
.hero-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

/* --- [04. ページヘッダー] --- */
/* ページ最上部のタイトルエリア。文字の間隔や色味を整えています */
/* パンくずリスト削除に伴い、固定ヘッダー分の避け余白(85px)をこちらに移しています */
.page-header {
    padding: 115px 25px 0px;
    text-align: center;
    position: relative;
}
.page-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 550;
    font-size: 28px;
    letter-spacing: 0.1rem;
    margin: 0;
    color: #1a2a40;
    line-height: 1.6;
}
.page-title span {
    display: block;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3em;
    margin-top: 10px;
    opacity: 0.6;
}

/* --- [ ヒーローイメージ設定] --- */
/* スマホ画面の最上部にぴったり配置し、横幅いっぱいに広げる背景ビジュアルです */
/* ヘッダーやタイトル文字の位置はそのまま保ち、画像は最背面に重ねて表示します */
.hero-image-full {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    line-height: 0;
    z-index: -1;
    pointer-events: none;
}
.hero-image-full img {
    width: 100%;
    height: auto;
    display: block;
}
.hero-image-full picture {
    display: block;
}

/* --- [ひょこっと出るきんちゃんの設定] --- */
/* 目次の背後から顔を出す「ひょっこりきんちゃん」専用のアニメーション設定です */

/* きんちゃんの「のぞき窓」（目次枠の下辺を基準にする） */
.kinchan-hyoko-wrapper {
    position: absolute;
    bottom: 0;
    right: 40px;
    width: 130px;
    height: 140px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* 動くコンテナ本体 */
.kinchan-apology-container {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    animation: hyoko-action 6s ease-in-out infinite;
    transform: translateY(100%);
}

/* きんちゃん画像本体のサイズ */
.kinchan-image { width: 125px; height: auto; }

/* ひょこっとアクション（上下移動 ＋ 左右に揺れる動きを追加） */
@keyframes hyoko-action {
    0%, 10% {
        transform: translateY(100%) rotate(0deg);
        opacity: 0;
    }
    20% {
        transform: translateY(20px) rotate(0deg);
        opacity: 1;
    }
    30% { transform: translateY(20px) rotate(-10deg); }
    45% { transform: translateY(20px) rotate(10deg); }
    60% { transform: translateY(20px) rotate(-10deg); }
    75% { transform: translateY(20px) rotate(0deg); }
    80% {
        transform: translateY(20px) rotate(0deg);
        opacity: 1;
    }
    90%, 100% {
        transform: translateY(100%) rotate(0deg);
        opacity: 0;
    }
}

/* --- [07. コンテンツエリア共通設定] --- */
/* 記事本文が収まるメインエリアの幅や余白を定義します */
main { position: relative; z-index: 1; }
.main-content {
    max-width: 800px;
    margin: 0 auto;
    /* ヒーロー画像(実寸 940×1200px、縦横比 ≒ 127.66vw)の下端に本文の開始位置を合わせています */
    padding: 127.66vw 25px 50px;
}

/* --- 目次セクション] --- */
.table-of-contents {
    /* 左右は main-content の余白(25px)分を打ち消して画面幅いっぱいに広げています */
    margin: 0 -25px 60px -25px;
    padding: 60px 35px 101px 35px;
    border: none;
    background: #fff;
    border-radius: 0;
    position: relative;
    z-index: 2;
}
.toc-header-image {
    display: block;
    height: 111px;
    position: absolute;
    left: 40px;
    bottom: 0;
}
.toc-list {
    list-style: none;
    padding: 0;
    width: fit-content;
    margin: 0 auto 45px;
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 17px;
    row-gap: 14px;
}
.toc-list li::before {
    content: "";
    display: inline-block;
    width: 2px;
    height: 14px;
    background: #1a2a40;
    margin-right: 8px;
}
.toc-list li {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
}
.toc-list li a {
    text-decoration: none;
    color: #1a2a40;
    transition: opacity 0.3s;
}
.toc-list li a:hover {
    opacity: 0.6;
}

/* --- [飲み方ページ専用デザイン] --- */
.content-section {
    margin-bottom: 50px;
    scroll-margin-top: 100px;
}
.section-label {
    display: inline-block;
    font-size: 14px;
    letter-spacing: 0.2em;
    color: #fff;
    background: #1a2a40;
    padding: 4px 12px;
    margin-bottom: 15px;
    border-radius: 2px;
}
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a2a40;
    display: flex;
    align-items: center;
}


.content-card {
    background: rgba(255, 255, 255, 0.6);
    padding: 30px 25px;
    border-radius: 4px;
    line-height: 1.8;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}
.card-text {
    position: relative;
    z-index: 2;
}
.section-image {
    display: block;
    width: 130px;
    height: auto;
    margin: -45px 0 10px auto;
    position: relative;
    z-index: 1;
}
.highlight-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a2a40;
    margin-right: 4px;
}
.base-amount-desc {
    font-size: 15px;
    color: #2d2d2d;
    margin-top: 10px;
}
.sub-text {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 25px;
    line-height: 1.4;
}

.powder-notice {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.small-info {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
    color: #555;
    padding: 15px 0px 15px;
    border-radius: 4px;
}
.small-info .dial-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
    text-align: center;
}
.small-info .dial-tel-link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1a2a40;
    text-decoration: none;
    letter-spacing: 0.05em;
}
.small-info .dial-tel-link img {
    width: 20px;
    height: auto;
    margin-right: 8px;
}
.small-info .dial-hours {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: center;
}
.other-item-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a2a40 !important;
    display: flex;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 5px;
    scroll-margin-top: 120px;
}
.list-dot li:first-child .other-item-title {
    margin-top: 0;
}
.other-item-title::before {
    content: "◈";
    color: #bda16b;
    margin-right: 8px;
    font-weight: 400;
    font-size: 14px;
}
.child-amount-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2a40;
    display: inline-block;
    margin-bottom: 8px;
    border-bottom: 2px solid #bda16b;
    padding-bottom: 2px;
}
.list-dot {
    list-style: none;
    padding: 0;
    margin: 0;
}
.list-dot li {
    position: relative;
    padding-left: 0;
    margin-bottom: 8px;
}

#kin-pos { position: absolute; width: 100%; height: 0; bottom: 0; left: 0; }

/* --- [TOPへ戻るボタンの設定] --- */

.totop-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    background-color: #bda16b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 200;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.1em;
}
.totop-button:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}
.totop-button.is-show {
    opacity: 1;
    visibility: visible;
}

.info-link-btn {
    display: block;
    text-align: center;
    padding: 12px;
    margin: 0px 15px 40px;
    background: #fff;
    color: #1a2a40;
    border: 1px solid #1a2a40;
    text-decoration: none;
    border-radius: 4px;
    font-size: 15px;
}

/* 購入セクション：ボタンのレイアウトと配色を定義します */
.btn-container {
    padding: 0 35px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}
.form-btn {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s;
    border-radius: 30px;
    box-sizing: border-box;
}
.form-btn:hover { opacity: 0.8; }
.btn-navy { background-color: #1a2a40; color: #fff; }
.btn-white { background-color: #fff; color: #1a2a40; border: 1px solid #1a2a40; }

/* ============================================================
   タブレット（768px〜）
   ============================================================ */
@media (min-width: 768px) {
    /* ヒーロー画像：768px以上ではbefore版と同じく通常フローの画像に切り替え、
       タイトルは絶対配置のまま画像の上部に重なる */
    .hero-image-full {
        position: static;
        left: auto;
        transform: none;
        width: 100%;
        margin: 0 auto;
        z-index: auto;
    }

    .page-header {
        padding: 115px 40px 0px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-title span {
        font-size: 14px;
    }

    .section-label {
        font-size: 14px;
    }

    .sub-text {
        font-size: 14px;
    }

    .powder-notice {
        font-size: 14px;
    }

    .small-info {
        font-size: 14px;
        background: none;
    }

    .small-info .dial-tel-link {
        font-size: 28px;
    }
    .small-info .dial-tel-link img {
        width: 24px;
    }
    .small-info .dial-hours {
        font-size: 14px;
    }

    .info-link-btn {
        font-size: 16px;
        max-width: 320px;
        margin: 0 auto 40px;
    }

    .main-content {
        max-width: 900px;
        padding: 0 40px 60px;
    }

    .table-of-contents {
        margin: 0 -40px 60px -40px;
        padding: 40px 40px 60px 40px;
    }

    .toc-header-image {
        width: 125px;
        max-width: 125px;
        height: auto;
        left: 40px;
    }

    .toc-list li {
        font-size: 17px;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .other-item-title {
        font-size: 18px;
    }

    .child-amount-title {
        font-size: 17px;
    }

    .content-card {
        padding: 35px 30px;
        font-size: 15px;
    }

    .section-image {
        width: 150px;
    }

    .btn-container {
        flex-direction: row;
        gap: 20px;
        padding: 0 20px;
        align-items: center;
    }

    .form-btn {
        max-width: 320px;
        height: 64px;
        font-size: 17px;
    }

    .totop-button {
        width: 60px;
        height: 60px;
        font-size: 14px;
    }
}

/* ============================================================
   PC（1024px〜）
   目次を左カラム固定（sticky）＋ コンテンツ右カラムの2グリッドレイアウト
   ============================================================ */
@media (min-width: 1024px) {
    .hero-image-full {
        max-width: none;
    }

    .hero-image-full img {
        max-width: 1024px;
        margin: 0 auto;
    }

    .page-header {
        padding: 115px 60px 0px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .page-title {
        font-size: 37px;
    }

    /* 2カラムグリッド：左260px（目次）＋ 右（コンテンツ） */
    .main-content {
        max-width: 1200px;
        padding: 60px 60px 80px;
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 0 80px;
        box-sizing: border-box;
    }

    /* 目次を左カラムにstickyで固定し、リストは縦積みに戻す */
    .table-of-contents {
        grid-column: 1;
        grid-row: 1 / span 99;
        position: sticky;
        top: 120px;
        align-self: start;
        margin: 0;
        padding: 35px 20px 90px 30px;
    }

    .toc-header-image {
        width: unset;
        max-width: unset;
        height: 90px;
        left: 20px;
    }

    .toc-list {
        display: block;
        width: 100%;
        margin: 0 0 30px;
    }
    .toc-list li {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .kinchan-hyoko-wrapper {
        width: 110px;
        right: 20px;
    }

    .content-section {
        scroll-margin-top: 130px;
        margin-bottom: 60px;
    }

    .other-item-title {
        scroll-margin-top: 150px;
        font-size: 18px;
    }

    .child-amount-title {
        font-size: 17px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .content-card {
        padding: 40px 35px;
        font-size: 15px;
    }

    .highlight-text {
        font-size: 2.2rem;
    }

    .section-image {
        width: 170px;
    }

    .small-info .dial-label {
        font-size: 13px;
    }
    .small-info .dial-tel-link {
        font-size: 32px;
    }
    .small-info .dial-tel-link img {
        width: 28px;
    }
    .small-info .dial-hours {
        font-size: 14px;
    }

    .info-link-btn {
        font-size: 16px;
    }

    .btn-container {
        padding: 0;
        gap: 30px;
        justify-content: center;
    }

    .form-btn {
        height: 64px;
        font-size: 17px;
        margin: 0;
    }

    .totop-button {
        width: 64px;
        height: 64px;
        font-size: 14px;
        /* main-content(max-width:1200px, margin:0 auto)の右端の20px外側に追従。
           ボタン幅(64px)分を差し引いた分岐点までは30pxの固定余白にフォールバックし、画面右端からのはみ出しを防ぐ */
        right: max(30px, calc(50% - 684px));
        bottom: 30px;
    }
}
