/* 統合・調整後のCSS */

/* -------------------- 全体設定 -------------------- */
body {
    /* 差し替え後のデザインを優先 */
    font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
    background: linear-gradient(135deg, #d8eaff, #f7e6ff, #e4f9ff);
    background-size: 300% 300%;
    animation: gradientFlow 12s ease infinite;
    padding: 20px;
    color: #333; /* 差し替え後の色を優先 */
    line-height: 1.5; /* 元のCSSから継承 */
    font-size: 100%; /* 元のCSSから継承 */
}

/* ゆっくり背景が動くアニメーション */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

div#pagebody {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

body,td,th {
    /* 差し替え後のbodyに統合されたため、残りはcolorとfont-sizeを継承 */
    color: #333; /* 差し替え後の色 */
    font-size: 100%;
}

/* -------------------- リンク -------------------- */
a {
    text-decoration: none;
}

/* ページ内リンク（差し替え後のスタイルを優先） */
#pagebody a {
    color: #3546b3;
    text-decoration: underline;
}
#pagebody a:hover {
    color: #6c2bc1;
}

/* その他のリンク（元のCSSから継承、ただしhoverは統一） */
a:link, a:visited {
    color: #3546b3; /* 差し替え後のリンクカラーに統一 */
}
a:hover {
    color: #6c2bc1; /* 差し替え後のホバーカラーに統一 */
    text-decoration: underline;
}


/* -------------------- 見出し -------------------- */
h1, h2, h3, h4 {
    /* 差し替え後の共通スタイル */
    font-family: "Noto Serif JP", serif;
    letter-spacing: 1px;
    color: #3a2d6f;
    text-shadow: 0 1px 3px rgba(255,255,255,0.7);
}

/* h1 */
h1 {
    font-size: 180%; /* 元のCSSから継承 */
}

/* h2（大見出し：濃いめ・存在感UP） */
h2 {
    /* 差し替え後のデザインを優先 */
    position: relative;
    padding: 18px 20px;
    margin: 45px 0 25px;
    font-size: 1.8em;
    font-weight: bold;
    color: #2d1f69;
    text-shadow:
        0 2px 6px rgba(255, 255, 255, 0.9),
        0 0 8px rgba(110, 80, 200, 0.6);
    background: linear-gradient(
        135deg,
        rgba(230, 215, 255, 0.95),
        rgba(180, 200, 255, 0.95)
        );
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 6px 15px rgba(100, 100, 200, 0.3),
        0 0 18px rgba(180, 200, 255, 0.7) inset;
}

/* h2 上部の光ライン（強め） */
h2::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 8%;
    width: 84%;
    height: 6px;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(210, 220, 255, 0.9),
        transparent
        );
    box-shadow: 0 0 10px rgba(210, 220, 255, 0.8);
}

/* h2 a の下線を解除（差し替え後の指定を優先） */
#pagebody h2 a {
    text-decoration: none;
}
h2 a {
    text-decoration: none !important;
}

/* h3（中見出し） */
h3 {
    /* 差し替え後のデザインを優先 */
    position: relative;
    padding: 8px 12px;
    margin: 30px 0 15px;
    font-size: 1.3em;
    color: #4a378d;
    background: rgba(255,255,255,0.65);
    border-left: 6px solid #a8b8ff;
    border-radius: 10px;
    box-shadow:
        0 2px 7px rgba(140,140,220,0.25),
        0 0 10px rgba(180,200,255,0.4) inset;
}

/* h3：横の光粒アニメ */
h3::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #d8e0ff;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: sparkle 2s infinite ease-in-out;
}

@keyframes sparkle {
    0% { opacity: 0.3; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.4); }
    100% { opacity: 0.3; transform: translateY(-50%) scale(1); }
}

/* h4（各項目） */
h4 {
    /* 共通設定を継承しつつ、元のCSSのpaddingとborder-left/bottomを調整 */
    font-size: 120%;
    padding: .25em 0 .25em .75em;
    border-left: 6px solid #a8b8ff; /* h3に合わせて調整 */
    border-bottom: 1px solid #ccc;
    border-color: #a8b8ff; /* h3に合わせて調整 */
}

/* h5 */
h5 {
    /* 元のCSSを継承、ただしborder-colorを調整 */
    font-size: 100%;
    padding: .25em 0 .25em .75em;
    border-left: 6px solid #a8b8ff; /* h3に合わせて調整 */
    border-color: #a8b8ff; /* h3に合わせて調整 */
}

/* -------------------- リスト -------------------- */
ol {
    display: block;
    background-color: #f4f4ff; /* 元のラベンダー系の色で統一 */
}
ul {
    display: block;
    background-color: #f4f4ff; /* 元のラベンダー系の色で統一 */
}

ul li{
    padding-top: 5px;
    padding-bottom: 5px;
    line-height: 1.5;
}
ol li{
    padding-top: 2px;
    padding-bottom: 2px;
    line-height: 1.5;
}

/* -------------------- ボックス/カード -------------------- */

/* カードデザイン (text-card) - 差し替え後のデザインを優先 */
.text-card {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(6px);
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow:
        0 4px 10px rgba(0,0,0,0.1),
        0 0 15px rgba(150,180,255,0.5) inset;
    transition: transform 0.25s, box-shadow 0.25s;
}

.text-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 18px rgba(0,0,0,0.15),
        0 0 20px rgba(180,200,255,0.7) inset;
}

/* 元のpush*クラスをtext-cardのデザインに近づけて調整 */
div.push0 {				/* ピンク */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 178, 255, 0.7); /* 薄いピンクの半透明枠 */
    border-radius: 18px; /* text-cardに統一 */
    background-color: rgba(255, 244, 255, 0.85); /* 薄いピンクの半透明背景 */
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
div.push {				/* ラベンダー */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(216, 178, 255, 0.7); /* 薄いラベンダーの半透明枠 */
    border-radius: 18px; /* text-cardに統一 */
    background-color: rgba(244, 244, 255, 0.85); /* 薄いラベンダーの半透明背景 */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
div.push2 {				/* ピンク */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 178, 255, 0.7);
    border-radius: 18px; /* text-cardに統一 */
    background-color: rgba(255, 244, 255, 0.85);
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
div.push3 {				/* 黄色 */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 215, 0, 0.7); /* 薄い黄色の半透明枠 */
    border-radius: 18px; /* text-cardに統一 */
    background-color: rgba(255, 255, 229, 0.85); /* 薄い黄色の半透明背景 */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
div.push4 {				/* 緑色 */
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(178, 255, 178, 0.7); /* 薄い緑の半透明枠 */
    border-radius: 18px; /* text-cardに統一 */
    background-color: rgba(244, 255, 249, 0.85); /* 薄い緑の半透明背景 */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.box7{
    /* 元のCSSを継承、ただし背景を半透明に調整 */
    padding: 0.5em 1em;
    margin: 2em 0;
    color: #474747;
    background: rgba(245, 245, 245, 0.8); /* 背景色を半透明に */
    border-left: double 7px #4ec4d3;/*左線*/
    border-right: double 7px #4ec4d3;/*右線*/
}
.box7 p {
    margin: 0;
    padding: 0;
}


/* -------------------- 引用 -------------------- */
blockquote {
    /* 元のCSSを継承、ただし背景を半透明に調整 */
    position: relative;
    padding: 35px 5px 10px 10px;
    box-sizing: border-box;
    font-style: italic;
    color: #777777;
    border-left: 4px solid #9dd4ff;
    background: rgba(255, 255, 255, 0.75); /* 背景を追加 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
    margin: 3px 3px;
    border-radius: 10px; /* 角丸を追加 */
}

blockquote:before{
    display: inline-block;
    position: absolute;
    top: 5px;
    left: 3px;
    content: "“";
    font-family: sans-serif;
    color: #9dd4ff;
    font-size: 90px;
    line-height: 1;
}

blockquote p {
    padding: 0;
    margin: 7px 0;
    line-height: 1.7;
}

blockquote cite {
    display: block;
    text-align: right;
    color: #888888;
    font-size: 0.9em;
}

/* -------------------- ボタン/枠リンク -------------------- */

/* .button - 元のボタンを差し替え後のデザインに調整 */
.button {
    display: inline-block;
    border-radius: 12px; /* 差し替え後のボタンに統一 */
    font-size: 12pt;
    text-align: center;
    cursor: pointer;
    padding: 10px 10px;
    background: linear-gradient(135deg, #bcd3ff, #e0c7ff); /* 差し替え後のボタン背景 */
    color: #2c2c2c; /* 差し替え後のボタン文字色に統一 */
    line-height: 1.5em;
    transition: .3s;
    border: 1px solid rgba(255,255,255,0.7); /* 差し替え後のボタン枠 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); /* 差し替え後のボタン影 */
    text-decoration: none;
}
.button:hover {
    background: linear-gradient(135deg, #cbe0ff, #f0d6ff); /* 差し替え後のホバー背景 */
    transform: translateY(-2px); /* 差し替え後のホバーアニメーション */
}

/* a.waku, a.waku2 - 差し替え後のボタンデザインに統一 */
a.waku {				/* ピンク系 */
    display: block;
    border-radius: 12px; /* 差し替え後のボタンに統一 */
    margin-bottom: 10px;
    text-align: center;
    cursor: pointer;
    padding: 10px 10px;
    background: linear-gradient(135deg, #bcd3ff, #e0c7ff);
    color: #2c2c2c !important;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: 0.25s;
    text-decoration: none;
}
a.waku2 {				/* ラベンダー系 */
    display: block;
    border-radius: 12px; /* 差し替え後のボタンに統一 */
    margin-bottom: 10px;
    text-align: center;
    cursor: pointer;
    padding: 10px 10px;
    background: linear-gradient(135deg, #cbe0ff, #f0d6ff); /* wakuと少し変えてラベンダー強調 */
    color: #2c2c2c !important;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: 0.25s;
    text-decoration: none;
}

a.waku:hover, a.waku2:hover {
    background: linear-gradient(135deg, #cbe0ff, #f0d6ff);
    transform: translateY(-2px);
    text-decoration: none;
}

/* .button15 - 元のCSSを継承、ただし色の統一感を出す */
.button15 a {
    display: block;
    position: relative;
    margin: 0 auto;
    padding: 1em 2em;
    width: 300px;
    color: #333;
    font-size: 18px;
    font-weight: 700;
    background-color: #d8e0ff; /* 明るいブルー系の色に調整 */
    border-radius: 50vh;
    transition: 0.3s;
    text-decoration: none;
}
.button15 a::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: #f2f2f2;
    border-radius: 50vh;
}
.button15 a::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 32px;
    transform: translateY(-50%) rotate(45deg);
    width: 5px;
    height: 5px;
    border-top: 3px solid #333333;
    border-right: 3px solid #333333;
}
.button15 a:hover {
    text-decoration: none;
    background-color: #c0c8f0; /* ホバー色を調整 */
}

/* -------------------- その他要素 -------------------- */
.like-btn {
    /* 差し替え後のボタンデザインを継承 */
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #bcd3ff, #e0c7ff);
    color: #2c2c2c !important;
    font-size: 90%;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    text-decoration: none;
    cursor: pointer;
    transition: 0.25s;
}

.like-btn:hover {
    background: linear-gradient(135deg, #cbe0ff, #f0d6ff);
    transform: translateY(-2px);
}

/* 画像 */
img.size {
    max-width: 100%;
    /* 差し替え後のデザインを優先 */
    border-radius: 15px;
    box-shadow:
        0 4px 15px rgba(150,150,255,0.4);
    width: 800px; /* 元のCSSから継承 */
}
img.size2 {
    max-width: 100%;
    /* 差し替え後のデザインを優先 */
    border-radius: 15px;
    box-shadow:
        0 4px 15px rgba(150,150,255,0.4);
    width: 560px; /* 元のCSSから継承 */
}

/* プリフォーマットテキスト */
pre {
    font-size:130%;
    white-space: pre-wrap ;
    /* push* クラスのデザインに近いものを適用 */
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #a8b8ff;
    border-radius: 10px;
    background-color: rgba(244, 244, 255, 0.9);
    overflow-x: auto;
}

/* マーカー */
.marker-P-pink {
    background: linear-gradient(transparent 60%, #ffd6ff 0%);
}

/* できごとリスト（.dekinai）- 元のCSSを継承しつつ、色を調整 */
.dekinai {
    background: rgba(255, 244, 255, 0.85); /* 薄いピンクの半透明背景に調整 */
    border-radius :8px;
    box-shadow :0px 0px 5px rgba(160, 160, 200, 0.3); /* 影の色を調整 */
    padding: 0.5em 0.5em 0.5em 2em;
    margin: 20px 0;
}
.dekinai li {
    line-height: 1.5;
    padding: 0.5em 0;
}

/* -------------------- ユーティリティ -------------------- */

/* シャドウ */
.shadow {
    text-shadow: 1px 1px 2px silver;
    font-weight: bold;
}

/* 連番カウンター */
.steps2 {
    counter-reset: step-counter;
}
.steps2 > h2 {
    counter-increment: step-counter;
}
.steps2 > h2:before {
    content: counter(step-counter)"位：";
}
/* h2は差し替え後のデザイン優先のため、この連番はデザイン上目立たない可能性があります */

.steps3 {
    counter-reset: step-counter;
}
.steps3 > h3 {
    counter-increment: step-counter;
}
.steps3 > h3:before {
    content: counter(step-counter)"位：";
}

.steps4 {
    counter-reset: step-counter;
}
.steps4 > h4 {
    counter-increment: step-counter;
}
.steps4 > h4:before {
    content: counter(step-counter)"位：";
}

/* 出典 */
.shutten {
    color: gray;
    font-size: small;
}

/* 横並びリスト */
.yoko li{
    display: inline-block;
    height: 40px;
}

/* モーダル（差し替え後のCSSから追加） */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,30,0.55);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(255,255,255,0.85);
    padding: 20px;
    width: 90%;
    max-width: 650px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow:
        0 6px 20px rgba(0,0,0,0.3),
        0 0 25px rgba(180,200,255,0.7) inset;
}

/* 閉じるボタン */
.modal-close {
    position: absolute;
    top: 10px; right: 16px;
    cursor: pointer;
    font-size: 22px;
    color: #555;
    transition: 0.2s;
}
.modal-close:hover {
    color: #000;
}

/* レスポンシブ iframe */
@media screen and (max-width: 560px) {
    .iframe-responsive {
        position: relative;
        width: 100%;
        padding: calc(315 / 560 * 100%) 0 0;
    }
    .iframe-responsive iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}