html {
    overflow-y: scroll;
}

body {
    text-align: center;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    margin: 0;
    /* ページ全体の余白を削除 */
    padding-top: 60px;
    /* 上下パディング + フォントサイズ分を考慮 */
    /* ヘッダーの高さ分だけ本文を下げる */
}

.fancy a {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
    transition: color 0.2s ease-in-out;
}

.fancy a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* *********** */
/* Canvas 関連 */
/* *********** */
#containerWrapper {
    display: flex;
    /* PC では中央配置 */
    width: 100%;
    overflow-x: auto;
    /* スマホで横スクロール */
}

#canvasContainer {
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
}

canvas {
    display: block;
    width: 1080px;
    /* キャンバスの幅を固定 */
    /* height: 420px; */
    /* キャンバスの高さを固定 */
}

/* ******************** */
/* データ及び予測情報関連 */
/* ******************** */
.score {
    margin-top: 1em;
    margin-bottom: 0;
    font-size: 1.6em;
}

.note {
    margin-top: 0;
    font-size: 0.75em;
}

.top_description {
    padding-top: 20px;
    padding-bottom: 20px;
    font-size: 1.2em;
}

#descriptionPastData {
    margin-top: 10px;
    font-size: 0.75em;
}

button {
    margin-top: 10px;
    padding: 5px;
    font-size: 16px;
}

button {
    margin-top: 10px;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: white;
    text-transform: uppercase;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(50%);
}

button:hover {
    filter: brightness(1.2);
}

button:active {
    transform: scale(0.95);
}

/* 一般的なテキストのスタイル */
p {
    font-size: 1.0em;
    line-height: 1.2;
    color: #444;
    margin: 10px auto;
    text-align: center;
}

/* 各ボタンの色 */
#redBtn {
    background: linear-gradient(45deg, #DC3545, #A71D2A);
}

#redBtn:disabled {
    background: linear-gradient(45deg, #cccccc, #999999);
    color: #666;
    border: 1px solid #bbb;
    cursor: not-allowed;
    opacity: 0.6;
}

#greyBtn {
    background: linear-gradient(45deg, #6C757D, #5A6268);
}

#blueBtn {
    background: linear-gradient(45deg, #007BFF, #0056b3);
}

#greyBtn:disabled {
    background: linear-gradient(45deg, #cccccc, #999999);
    color: #666;
    border: 1px solid #bbb;
    cursor: not-allowed;
    opacity: 0.6;
}

#blueBtn:disabled {
    background: linear-gradient(45deg, #cccccc, #999999);
    color: #666;
    border: 1px solid #bbb;
    cursor: not-allowed;
    opacity: 0.6;
}

.separator::before {
    content: "★ ★ ★";
    display: block;
    font-size: 1.2em;
    color: #5A6268;
    margin: 50px 0;
    letter-spacing: 15px;
    text-align: center;
}

/* ******************** */
/* 小ウィンドウのスタイル */
/* ******************** */
#overlayWindow {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 280px;
    background: rgba(20, 20, 20, 0.9);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.4);
    display: none;
    /* 初期状態は非表示 */
    z-index: 1000;
    /* ページのコンテンツより前面に */
    font-family: 'Arial', sans-serif;
    backdrop-filter: blur(5px);
    /* 背景をぼかす */
}

#overlayWindow p {
    color: white;
}

/* ヘッダー */
#overlayHeader {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

/* 閉じるボタン */
#overlayClose {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 1.4em;
    color: #ccc;
    transition: color 0.2s;
}

#overlayClose:hover {
    color: white;
}

/* リストのデザイン */
#overlayWindow ul {
    list-style: none;
    padding: 0;
}

#overlayWindow li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

#overlayWindow li::before {
    content: "✔";
    /* チェックマーク */
    position: absolute;
    left: 0;
    color: #28A745;
    /* 緑系で信頼感を演出 */
    font-weight: bold;
}

/* 有償プランのリンク */
#overlayWindow a {
    color: #FFA500;
    font-weight: normal;
    text-decoration: underline;
    transition: color 0.2s, font-weight 0.2s;
}

#overlayWindow a:hover {
    color: #FFD700;
    font-weight: bold;
}


/* ******* */
/* ヘッダー */
/* ******* */
#header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 15px;
    background: linear-gradient(45deg, #222, #444);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    height: auto;
}

/* ヘッダーの内部 */
#headerContent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    /* PCでは最大800px */
    padding: 0 20px;
}

/* タイトルと説明文のコンテナ */
#headerTitleContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* タイトル下の説明 */
#headerDescription {
    font-size: 11px;
    color: #ccc;
    margin-top: 0;
    margin-bottom: 2px;
    /* white-space: nowrap; */
    text-align: left;
}

/* タイトル */
#headerTitle {
    font-size: 22px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
    margin-top: 2px;
    margin-bottom: 0;
}

/* タイトルのリンク */
#headerTitle a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}

#headerTitle a:hover {
    transform: scale(1.1);
}

/* ******************** */
/* 銘柄選択 & 日付選択コンテナ */
/* ******************** */
#selectionContainer {
    /* 初期状態で閉じる */
    display: none;
}

.selection-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    /* 画面幅が狭ければ自動で2行に */
    gap: 10px;
    /* アイテム間の間隔 */
    margin: 10px auto;
    text-align: center;
    max-width: 800px;
}

/* 複数選択 */
.selection-element {
    flex: 0 1 auto;
    text-align: center;
    min-width: 300px;
}

/* プルダウンメニュー */
.pull-down-menu {
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #007BFF;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    outline: none;
    min-width: 300px;
    /* 必要最低限の幅 */
}

.fit {
    min-width: 0px;
}

.pull-down-menu:disabled {
    background-color: #f0f0f0;
    color: #999;
    border: 1px solid #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 日付入力 */
#dateSelect {
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #007BFF;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    outline: none;
    /* min-width: 200px; */
    /* 必要最低限の幅 */
}

/* ホバー時のスタイル */
#stockSelect:hover,
#stockSelect:focus,
#dateSelect:hover,
#dateSelect:focus {
    background: #e9ecef;
    border-color: #0056b3;
}

/* 画面幅が狭くなった場合、2行に自動で折り返す */
@media (max-width: 350px) {
    .selection-container {
        flex-direction: column;
        /* 2行で表示 */
        align-items: center;
    }
}

/* テキストボックス */
.text-input {
    font-size: 1.1em;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 8px;
    border: 2px solid #007BFF;
    background: #f8f9fa;
    color: #333;
    outline: none;
    transition: all 0.3s ease-in-out;
    min-width: 300px;
    /* 必要最低限の幅 */
}

/* ホバー・フォーカス時 */
.text-input:hover,
.text-input:focus {
    background: #e9ecef;
    border-color: #0056b3;
}

.text-input:disabled {
    background-color: #f0f0f0;
    color: #999;
    border: 1px solid #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 画面幅が狭くなった場合の対応 */
@media (max-width: 350px) {
    .text-input {
        min-width: 100%;
        /* 小さい画面では幅を広げる */
    }
}

/* チェックボックス */
.periods-checkbox {
    display: flex;
    flex-wrap: wrap;
    /* 幅が足りない場合は折り返し */
    gap: 10px;
    /* 各チェックボックスの間隔 */
    align-items: center;
}

.checkbox-label {
    font-size: 1.1em;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #007BFF;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    /* min-width: 20px; */
}

/* label には disabled 属性がないため回避策 */
.disabled {
    background-color: #f0f0f0;
    color: #999;
    border: 1px solid #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.checkbox-label:hover {
    background: #e9ecef;
    border-color: #0056b3;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

@media (max-width: 350px) {
    .selection-container {
        flex-direction: column;
        align-items: center;
    }

    .selection-element {
        min-width: 100%;
    }
}

/* ******************** */
/* ナビゲーションメニュー */
/* ******************** */
#headerLinks {
    display: flex;
    gap: 20px;
    font-size: 18px;
}

/* 各リンク */
.header-link {
    color: white;
    font-weight: bold;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* メニューアイコン（スマホ用） */
#menuIcon {
    display: none;
    /* PCでは非表示 */
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* スマホ向け */
@media (max-width: 768px) {
    #headerContent {
        flex-direction: row;
    }

    /* メニューアイコンを表示 */
    #menuIcon {
        display: block;
        padding-right: 1em;
    }

    /* ナビゲーションメニューをデフォルトで非表示 */
    #headerLinks {
        display: none;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        top: 70px;
        right: 15px;
        background: rgba(34, 34, 34, 0.95);
        padding: 10px;
        margin-right: 1em;
        border-radius: 8px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);

        align-items: flex-start;
    }

    /* メニューが開いたときに表示 */
    #headerLinks.open {
        display: flex;
    }
}

/* ************* */
/* WordPress記事 */
/* ************* */
.blog-container {
    text-align: center;
    max-width: 800px;
    margin: 30px auto;
    padding: 15px;
    background: #EFEFEF;
}

.blog-container h2 {
    font-size: 1.6em;
    font-weight: 500;
    color: #333;
    text-align: center;
    padding-bottom: 5px;
    /* border-bottom: 2px solid #666; */
    /* 他の要素と統一 */
    display: inline-block;
}

.blog-item {
    padding: 12px 0;
    border-bottom: 1px solid #ccc;
}

.blog-item:last-child {
    border-bottom: none;
}

.blog-item h3 {
    margin: 0;
    font-size: 1.2em;
}

.blog-item a {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
    transition: color 0.2s ease-in-out;
}

.blog-item a:hover {
    text-decoration: underline;
    color: #0056b3;
}

.blog-date {
    font-size: 0.9em;
    color: #666;
}

#moreBlogBtn {
    margin-top: 10px;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: white;
    background: linear-gradient(45deg, #007BFF, #0056b3);
    text-transform: uppercase;
}

#moreBlogBtn:hover {
    filter: brightness(1.2);
}

#moreBlogBtn:active {
    transform: scale(0.95);
}

/* ******** */
/* フッター */
/* ******** */
#footer {
    background: #222;
    text-align: center;
    /* 中央寄せ */
    padding: 15px 10px;
    font-size: 0.9em;
    margin-top: 50px;
    width: 100%;
    /* フル幅にする */
}

#footer p {
    margin: 5px 0;
    color: #888;
}

/* フッター内のリンクの装飾 */
#footer a {
    color: #A9B1BC;
    text-decoration: none;
    font-weight: normal;
    transition: color 0.2s ease-in-out;
}

#footer a:hover {
    color: #C0C5CC;
    text-decoration: underline;
}

/* -------------------- */
/* 歯車アイコンのスタイル */
/* -------------------- */
.gear-icon {
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.gear-icon.active {
    transform: rotate(180deg);
}

/* ************ */
/* 装飾コンテナ  */
/* ************ */
#fancy-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#fancy-container h2 {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

#fancy-container p {
    font-size: 1em;
    color: #444;
    line-height: 1.5;
    /* text-align: left; */
    max-width: 600px;
    padding-bottom: 1em;
}


.fancy-feature-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fancy-feature-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.fancy-feature-item h3 {
    font-size: 1.4em;
    color: #007BFF;
    margin-bottom: 8px;
    text-align: left;
}

.fancy-feature-item p {
    font-size: 1em;
    color: #444;
    text-align: left;
}

/* 申込みボタン */
.mini-container {
    margin-top: 30px;
}

.blueBtnLink {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    background: linear-gradient(45deg, #007BFF, #0056b3);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.blueBtnLink:hover {
    filter: brightness(1.2);
}

.blueBtnLink:active {
    transform: scale(0.95);
}


figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}
  
figure img {
    max-width: 580px;
    height: auto;
    border-radius: 8px; /* 必要なら角を丸める */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 軽い影 */
    border: 2px solid #ccc; 
}

figcaption {
    max-width: 580px;
    margin-top: 0.8em;
    font-size: 0.9em;
    color: #555;
    text-align: center;
    line-height: 1.4;
}