/* smart-print 共通スタイル */
html {
    scroll-padding-top: 80px;
    scroll-behavior: smooth;
}

body {
    color: #4D4D4D;
    font-family: "M PLUS Rounded 1c", sans-serif;
    background-color: #fff;
}

a {
    color: #78BC4E;
}

a:hover {
    opacity: 0.7;
}

/* パンくず（本番に近いデザイン：> 区切り・ダークグレー） */
.breadcrumb-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.breadcrumb-nav .breadcrumb {
    margin-top: 10px;
    margin-bottom: 0;
    padding: 0.5rem 0;
    font-size: 14px;
    background: none;
    --bs-breadcrumb-divider: '>';
    flex-wrap: nowrap;
}
.breadcrumb-nav .breadcrumb-item {
    color: #4a4a4a;
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
    content: '>';
    color: #4a4a4a;
    padding: 0 0.35rem;
}

.breadcrumb-nav .breadcrumb-item a {
    color: #4a4a4a;
    text-decoration: none;
}

.breadcrumb-nav .breadcrumb-item a:hover {
    opacity: 0.7;
    color: #4a4a4a;
}

.breadcrumb-nav .breadcrumb-item.active {
    color: #4a4a4a;
}

.navbar-brand .logo-text {
    font-weight: 700;
    font-size: 1.1rem;
}

.navbar-brand .logo {
    height: 40px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.navbar-brand-center .container {
    position: relative;
    display: flex;
    justify-content: center;
}
.navbar-brand-center .navbar-toggler {
    position: absolute;
    right: 10px;
}

@media (max-width: 767px) {
    .navbar-brand .logo {
        height: 32px;
        max-width: 220px;
    }
}

/* 固定ナビの下に余白（ロゴ・メニューが隠れないように） */
.content-below-header.pt-navbar {
    padding-top: 70px;
}

/* トップページのカード内ロゴ（幅60%・中央寄せ） */
.card-logo {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.global-menu {
    margin-top: 70px;
}

.global-menu-list {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    gap: 0 0.5rem;
    width: 100%;
}

.global-menu .each-menu {
    text-align: center;
    flex: 1 1 0;
    min-width: 0;
}

.global-menu .each-menu a {
    color: #4D4D4D;
    text-decoration: none;
}

.global-menu .each-menu a:hover {
    opacity: 0.8;
}

@media (max-width: 767px) {
    .global-menu-scroll-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 0;
        padding-right: 0;
    }
    .global-menu-scroll-wrap::-webkit-scrollbar {
        display: none;
    }
    .global-menu-list {
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
        padding: 0.5rem 0;
        gap: 0;
    }
    .global-menu-list .each-menu {
        flex: 0 0 auto;
        min-width: 100px;
        padding: 0 0.25rem;
    }
}

h1 {
    font-size: 26px;
    font-weight: bold;
}

/* 学年ページ（4年生等）のメインタイトル：中央寄せ・背景付き・大きめ */
h1.grade-page-title {
    display: block;
    text-align: center !important;
    font-size: 2rem !important;
    font-weight: bold !important;
    background: #EDF7ED !important;
    color: #2d5a2d !important;
    padding: 1.25rem 1.5rem !important;
    margin: 0 0 2rem 0 !important;
    border-radius: 8px !important;
    border: none !important;
    box-shadow: none !important;
}

/* 学年ページ内リスト：・を非表示 */
.kanji-grade-top ul {
    list-style: none;
    padding-left: 0;
}
.kanji-grade-top ul li {
    margin-bottom: 10px;
}
.grade-list-link {
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    row-gap: 0;
    border: 1.5px solid #78BC4E;
    border-radius: 6px;
    padding: 6px 12px;
    transition: background-color 0.15s;
}
.grade-list-link:hover {
    text-decoration: none;
    background-color: #f2fbee;
}
.grade-list-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.bushu-reading {
    font-size: 14px;
}
.bushu-count {
    color: #999999;
    font-size: 14px;
    white-space: nowrap;
}
@media (max-width: 767px) {
    .bushu-count {
        flex-basis: 100%;
    }
}

h2 {
    font-size: 21px;
    font-weight: bold;
    position: relative;
    background: #D7EFF5;
    box-shadow: 0 0 0 5px #D7EFF5;
    border: dashed 2px white;
    padding: 0.5em 0.8em;
    color: #595757;
}

h2:after {
    position: absolute;
    content: '';
    left: -7px;
    top: -7px;
    border-width: 0 0 15px 15px;
    border-style: solid;
    border-color: #fff #fff #A6DCE9;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
}

.container.main {
    min-height: 50vh;
}

/* ========== 英語ページ ========== */
.btn-primary {
    --bs-btn-bg: #F6AC19;
    --bs-btn-border-color: #F6AC19;
    --bs-btn-hover-bg: #F1900E;
    --bs-btn-hover-border-color: #F6AC19;
    --bs-btn-active-bg: #F1900E;
    --bs-btn-active-border-color: #F1900E;
    min-width: 200px;
    min-height: 66px;
    padding: 0 20px;
    border-radius: 40px;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-h2 {
    font-size: 32px;
    font-weight: bold;
    background: none;
    border: none;
    box-shadow: none;
    color: #595757;
}

.top-h2:after {
    display: none;
}

/* アコーディオン見出しは h2 の装飾を付けない */
h2.accordion-header {
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    position: static;
}
h2.accordion-header:after {
    display: none;
}
.accordion-button {
    background: #e9ecef;
    color: #212529;
    border: 1px solid rgba(0,0,0,0.125);
}
.accordion-button:not(.collapsed) {
    background: #d3d6d9;
    color: #212529;
    box-shadow: none;
}

.accordion-group-name {
    font-weight: 700;
}
.accordion-preview {
    margin-top: 0.2rem;
    max-width: 100%;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .top-h2 { font-size: 20px; }
}

/* オリジナル学習プリントセクション */
.original-section {
    background: #FFFBEE;
    padding: 56px 0;
    margin: 0 calc(50% - 50vw);
    width: 100vw;
    overflow-x: hidden;
}

.original-section-title {
    font-size: 18px;
}

/* ゲームセクション */
.game-section {
    padding: 4rem 0;
}

.game-lead {
    font-size: 14px;
    line-height: 1.7;
    color: #4D4D4D;
}

.game-steps-wrap {
    background: #FDF4F6;
    border-radius: 24px;
    overflow: hidden;
}

.game-steps-row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    margin: 0;
}

.game-steps-row > .game-step-col {
    padding: 30px 40px;
}

.game-steps-row > .game-step-col:nth-child(2) {
    background: #FCE9EC;
}

.game-step-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.game-step-num {
    font-size: 54px;
    line-height: 1;
    font-weight: 700;
    color: #F090A2;
}

.game-step-label {
    font-size: 24px;
    line-height: 1.25;
    color: #F090A2;
    font-weight: 700;
}

.game-step-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.03);
}

.game-step-icon {
    display: block;
    font-size: 2.5rem;
    color: #F090A2;
}

.game-step-text {
    font-size: 14px;
    line-height: 1.6;
    color: #4D4D4D;
}

@media (min-width: 769px) {
    .game-steps-row > .game-step-col.arrow {
        position: relative;
    }
    /* 右矢印（三角）: col 境界に出す */
    .game-steps-row > .game-step-col.arrow::after {
        content: "";
        position: absolute;
        top: 50%;
        right: -22px;
        transform: translateY(-50%);
        border-top: 22px solid transparent;
        border-bottom: 22px solid transparent;
        pointer-events: none;
        z-index: 1;
    }
    .game-steps-row > .game-step-col.arrow-1::after {
        border-left: 22px solid #FDF4F6;
    }
    .game-steps-row > .game-step-col.arrow-2::after {
        border-left: 22px solid #FCE9EC;
    }
}

@media (max-width: 768px) {
    .game-steps-row > .game-step-col { padding: 1.5rem 1rem; }
    .game-step-label { font-size: 20px; }
    .game-step-card { padding: 10px; }
    .game-steps-row > .game-step-col.arrow::after { display: none; }
}

/* できることセクション */
.about-section {
    padding: 4rem 0;
    margin-bottom: 0;
}

.about-section .logo {
    max-width: 415px;
    height: auto;
    margin-bottom: 9px;
}

@media (max-width: 768px) {
    .about-section .logo { max-width: 280px; }
}

.feature-card {
    background: #D7EFF5;
    border: 4px solid #9DD9E7;
    height: 100%;
    padding: 1rem 1.5rem;
}

.feature-title {
    font-weight: 700;
    letter-spacing: 0.05em;
}

.feature-card .thumb {
    position: relative;
    background: #fff;
    padding: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.feature-card .free-badge {
    position: absolute;
    right: -15px;
    bottom: -15px;
    width: 80px;
    height: 80px;
    pointer-events: none;
}

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

.feature-list li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #F090A2;
}

@media (max-width: 768px) {
    .feature-card { margin-bottom: 20px; height: auto; }
}

/* 英語練習プリントブロック（section で囲み、上下 padding を他セクションと同様に） */
.print-section {
    padding: 4rem 0;
}

.print-section-wrap {
    background-color: #EDF7ED;
    border-radius: 16px;
    padding: 2rem 0;
}

.print-section-wrap .print-section-inner {
    padding-top: 0;
}

/* プリントカード */
.print-card {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: 18px 18px 28px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    color: #595757;
    text-decoration: none;
}

.print-card:hover {
    color: #595757;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.print-card .thumb {
    margin-bottom: 0.5rem;
}

.print-card .go-circle {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #78BC4E;
    font-size: 1.25rem;
}

.print-card-icon {
    display: block;
    font-size: 2.5rem;
    color: #78BC4E;
}

/* 練習プリントトップ（/english/print/）：2ブロックカード */
.print-top-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.print-top-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #2f2a26;
}
.print-top-card-desc {
    font-size: 0.9rem;
    color: #595757;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.print-top-card .btn {
    border-radius: 40px;
}

/* 練習プリント一覧（ja-en / en-ja）：リード・タブ・ブロックカード */
.print-list-lead {
    color: #595757;
    font-size: 0.95rem;
}
.print-type-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.print-type-nav .btn {
    border-radius: 40px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    min-height: 48px;
    border-width: 2px;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.print-type-nav .btn-primary {
    box-shadow: 0 2px 6px rgba(246, 172, 25, 0.35);
}
.print-type-nav .btn-outline-secondary {
    border-color: #dee2e6;
    color: #595757;
    background: #fff;
}
.print-type-nav .btn-outline-secondary:hover {
    border-color: #F6AC19;
    color: #F1900E;
    background: #fffef9;
}
.print-block-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.print-block-card .paper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 4em;
}
.print-block-card .paper div {
    display: inline-block;
    background: #e9ecef;
    color: #2f2a26;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    margin: 0;
}
.print-block-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.print-block-btns .btn {
    flex: 1 1 auto;
    min-width: 0;
}
.print-block-btns .btn i {
    margin-right: 0.25rem;
}

/* 汎用 .paper（一覧で .print-block-card 内以外で使う場合） */
.paper {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}
.paper div {
    margin-bottom: 0.25rem;
}

/* ========== プリントシート（ja-en / en-ja sheet） ========== */
.sheet .keyword {
    display: grid;
    height: 72px;
    border: 1.5px solid #4b403a;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    color: #2f2a26;
}

.sheet .keyword.ja-en {
    grid-template-columns: 1fr 3fr 6fr;
}
.sheet .keyword.ja-en.picture {
    grid-template-columns: 1fr 4fr 5fr;
}
.sheet .keyword.en-ja {
    grid-template-columns: 1fr 5fr 4fr;
}

.sheet .keyword .cell {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sheet .keyword .cell + .cell {
    border-left: 1.5px solid #4b403a;
}

.sheet .keyword .idx {
    font-family: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1;
}

.sheet .keyword .word {
    gap: 2px;
    padding: 5px;
}

.sheet .keyword .word .char {
    font-family: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: .02em;
    width: 100%;
    text-align: left;
}

.sheet .keyword .word .id {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

/* 画像付き：中央セル内で画像左・日本語右の横並び */
.sheet .keyword.picture .word {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    flex-wrap: nowrap;
}
.sheet .keyword.picture .word .image {
    flex-shrink: 0;
}
.sheet .keyword.picture .word .image img {
    width: 50px;
    height: 50px;
    margin-left: 5px;
    margin-right: 10px;
    object-fit: contain;
    display: block;
}
.sheet .keyword.picture .word .char {
    flex: 1 1 auto;
    min-width: 0;
}

.sheet .keyword .practice {
    background: none;
    position: relative;
    padding-inline: 14px;
}

.sheet .keyword .practice.lines {
    background-image:
        repeating-linear-gradient(to right, #d5d5d5 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to right, #d5d5d5 0 6px, transparent 6px 12px),
        linear-gradient(#d5d5d5, #d5d5d5),
        repeating-linear-gradient(to right, #d5d5d5 0 6px, transparent 6px 12px);
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: 100% 1px, 100% 1px, 100% 2px, 100% 1px;
    background-position: 0 14px, 0 28px, 0 44px, 0 60px;
}

.sheet .keyword .practice::before {
    content: attr(data-ghost);
    position: absolute;
    inset: 0 12px 4px 0;
    margin: auto;
    width: max-content;
    height: max-content;
    font-family: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
    font-weight: 400;
    font-size: 32px;
    line-height: 1;
    color: rgba(0,0,0,.18);
    pointer-events: none;
    user-select: none;
}

/* プリント用ヘッダー・フッター（画面では非表示） */
.print-header {
    margin-bottom: 30px;
}
.print-header .header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8mm;
    flex-wrap: nowrap;
}
.print-header .logo {
    text-align: right;
    margin-bottom: 20px;
}
.print-header .logo img {
    width: 200px;
    height: 21px;
    object-fit: contain;
    filter: grayscale(100%);
}
.print-header .title {
    font-weight: 700;
    font-size: 14pt;
    line-height: 1.2;
    flex: 1 1 auto;
    white-space: nowrap;
}
.fill-field {
    display: flex;
    align-items: flex-end;
    gap: 6mm;
    flex-shrink: 0;
    white-space: nowrap;
}
.fill-field .field {
    display: flex;
    align-items: flex-end;
    gap: 3mm;
}
.fill-field .label {
    font-size: 10pt;
    white-space: nowrap;
}
.fill-field .line {
    display: inline-block;
    border-bottom: 1px solid #000;
    height: 1.2em;
}
.fill-field .line-date { min-width: 35mm; }
.fill-field .line-name { min-width: 50mm; }

/* サイトフッター（Copyright）の上余白 */
.container-fluid.footer {
    margin-top: 80px;
}

.print-footer {
    margin-top: 10mm;
}
.print-footer .print-date {
    text-align: right;
    font-size: 9pt;
}
.print-footer .pr {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4mm;
    margin-top: 2mm;
}
.print-footer .qr {
    margin-left: 10px;
}
.print-footer .qr img {
    width: 16mm;
    height: auto;
    display: block;
}
.print-footer .text {
    font-size: 9.5pt;
}
.print-footer .pr .pr-url {
    margin-left: 30px;
    font-size: 9.5pt;
}

.print-header,
.print-footer {
    display: none;
}

.print-chunk {
    margin-top: 20px;
}

/* オリジナル英語学習プリント（単語選択→シートへリンク） */
#sp-original .sticky-bottom-ops {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 0.75rem 0;
    border-top: 1px solid #eee;
}
#sp-original .sp-original-check {
    cursor: pointer;
    position: relative;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem !important;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}
#sp-original .sp-original-check .form-check-input {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    float: none;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}
#sp-original .sp-original-check .form-check-label {
    display: block;
    width: 100%;
    margin: 0;
    cursor: pointer;
}

/* ========== 単語帳シート（word-card） ========== */
.word-cards {
    display: flex;
    flex-direction: column;
    margin: 16px 0;
}

.word-card {
    display: flex;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    min-height: 84px;
    background: #fff;
}

.word-card > .left,
.word-card > .right {
    line-height: 1.4;
    word-break: break-word;
    width: 50%;
}

.word-card > .left {
    order: 1;
    background: #fff;
    padding: 12px 14px;
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.word-card > .left .image img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    object-fit: contain;
}

.word-card > .left .word {
    font-size: 1.05rem;
}

.word-card > .right {
    order: 2;
    background: #f8fafc;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.word-card > .right .word {
    font-weight: 600;
    font-size: 1.15rem;
}

.word-card > .right .small {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.word-card > .left {
    border-right: 1px solid #e5e7eb;
}

@media (max-width: 600px) {
    .word-card {
        flex-direction: column;
        min-height: auto;
    }
    .word-card > .left {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
}

/* ========== 記事（article）カード・詳細 ========== */
.article-card {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    padding: 16px;
}
.article-card:hover {
    box-shadow: inset 0 0 0 2px #22c55e, 0 6px 18px rgba(0, 0, 0, 0.08);
}
.article-card:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px #16a34a, 0 0 0 3px rgba(22, 163, 74, 0.15);
}
.article-card .thumb {
    background: #f8fafc;
    margin-bottom: 10px;
}
.article-card .title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    color: #111827;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.5em * 2);
}
.article-card:hover .title {
    color: #111827;
}
.article-card .article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.article-card .badge-tag {
    background: #F5F5F5;
    color: #595757;
    border: 0;
    font-weight: normal !important;
}
.article-card .more {
    font-size: 14px;
    color: #78BC4E;
    font-weight: 700;
}

/* 記事詳細本文 */
.article-detail-body #sec01,
.article-detail-body #sec01 p {
    font-size: 16px;
    line-height: 200%;
}
.article-detail-body h1 {
    margin-bottom: 30px;
}
.article-detail-body h2 {
    margin-top: 40px;
    margin-bottom: 30px;
}
.article-detail-body h3 {
    border-left: 5px solid #D7EFF5;
    padding: 10px 0 10px 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}
.article-detail-body figure {
    text-align: center;
    margin-bottom: 30px;
}
.article-detail-body figure img,
.article-detail-body img.alignnone {
    border-radius: 8px;
    width: 80%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
}
.article-detail-body .wp-block-embed__wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    height: 0;
}
.article-detail-body .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 漢字アドベンチャー 固定バナー */
.kanji-adventure-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
}
.kanji-adventure-sticky-close {
    position: absolute;
    top: -9px;
    right: 4px;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: none;
    background: #555;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 0;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.kanji-adventure-sticky-close:hover {
    opacity: 1;
}
@media (max-width: 992px) {
    .kanji-adventure-sticky-close {
        top: -12px;
    }
}
@media (max-width: 768px) {
    .kanji-adventure-sticky-close {
        top: -16px;
    }
}
@media (max-width: 576px) {
    .kanji-adventure-sticky-close {
        top: -20px;
    }
}
.kanji-adventure-lp {
    background: linear-gradient(180deg, transparent 20%, #FFFCEE 20%);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    text-decoration: none;
    color: inherit;
}
.kanji-adventure-lp {
    transition: transform 0.2s ease;
}
.kanji-adventure-lp:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-3px);
    opacity: 1 !important;
}
.kanji-adventure-lp .btn-primary {
    background-color: #F1900E;
    border-color: #F1900E;
}
.kanji-adventure-lp .btn-primary:hover {
    background-color: #d87e0b;
    border-color: #d87e0b;
}
@media (max-width: 768px) {
    .kanji-adventure-lp {
        background: linear-gradient(180deg, transparent 10%, #FFFCEE 10%);
        padding: 0 24px;
        flex-direction: column;
        gap: 0;
    }
    .kanji-adventure-lp img {
        width: 100%;
    }
    .kanji-adventure-lp::after {
        content: "特設サイトへ >";
        width: 100vw;
        background-color: #F1900E;
        color: white;
        text-align: center;
        padding: 4px 0;
        margin: 0 -24px;
    }
}

/* 記事詳細: 本文とサイドバーを横並びに維持（回り込み防止） */
.article-detail-body .article-detail-row {
    display: flex;
    flex-wrap: nowrap;
}
.article-detail-body .article-detail-row > .article-detail-main {
    min-width: 0;
    flex: 0 0 75%;
    max-width: 75%;
}
.article-detail-body .article-detail-row > .article-detail-sidebar {
    flex: 0 0 25%;
    max-width: 25%;
}
@media (max-width: 767.98px) {
    .article-detail-body .article-detail-row {
        flex-wrap: wrap;
    }
    .article-detail-body .article-detail-row > .article-detail-main,
    .article-detail-body .article-detail-row > .article-detail-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
.article-detail-body .article-detail-content {
    overflow-wrap: break-word;
    overflow-x: auto;
}
.article-detail-body .article-detail-content::after {
    content: "";
    display: table;
    clear: both;
}

/* 記事詳細本文（参照: past_article_page / normal_article_page 相当） */
.article-detail-body .article-detail-content {
    font-size: 16px;
    line-height: 200%;
}
.article-detail-body .article-detail-content h1 {
    margin-bottom: 30px;
}
.article-detail-body .article-detail-content h2 {
    margin-top: 40px;
    margin-bottom: 30px;
}
.article-detail-body .article-detail-content h3 {
    border-left: 5px solid #D7EFF5;
    padding: 10px 0 10px 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}
.article-detail-body .article-detail-content .article-body-img,
.article-detail-body .article-detail-content img.alignnone {
    border-radius: 8px;
    max-width: 80%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
}
.article-detail-body .article-detail-content .article-body-blockquote,
.article-detail-body .article-detail-content blockquote {
    margin: 1em 0;
    padding: 0.5em 1em;
    border-left: 4px solid #ddd;
    color: #555;
}
/* サイドバー「同じカテゴリーの記事」: 画像上・テキスト下で比率を安定（Markdown/HTML 両方の記事で共通） */
.article-detail-sidebar .article-sidebar-item,
.article-detail-body .article-sidebar-item {
    display: block;
}
.article-detail-sidebar .article-sidebar-thumb,
.article-detail-body .article-sidebar-thumb {
    width: 100%;
    max-width: 160px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    margin-bottom: 6px;
}
.article-detail-sidebar .article-sidebar-title,
.article-detail-body .article-sidebar-title {
    display: block;
    font-size: 0.9rem;
    line-height: 1.4;
    color: inherit;
}
.article-detail-sidebar .article-sidebar-item:hover .article-sidebar-title,
.article-detail-body .article-sidebar-item:hover .article-sidebar-title {
    text-decoration: underline;
}
