/* 右下の「エージェント比較」バナー（inc/float-banner.php・js/float-banner.js） */
.ct-fbn {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 900; /* スマホのメニュー（ドロワー、z-index 1000）より下に置く */
    width: 300px;
    border: 2px solid #121212;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .25s, transform .25s;
}
.ct-fbn.is-show { opacity: 1; transform: none; }
.ct-fbn[hidden] { display: none; }

.ct-fbn__item { display: block; overflow: hidden; border-radius: 8px; color: #121212; text-decoration: none; }
.ct-fbn__item[hidden] { display: none; }
.ct-fbn__item img { display: block; width: 100%; height: auto; }
.ct-fbn__cap { display: block; padding: 8px 12px; background: #FABE00; font-size: 13px; font-weight: 800; line-height: 1.4; }
.ct-fbn__item:hover .ct-fbn__cap { background: #121212; color: #FABE00; }

.ct-fbn__close {
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #121212;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.ct-fbn__close:focus-visible { outline: 3px solid #D65200; outline-offset: 2px; }

/* 「先頭へ戻る」ボタンは、バナーの上に逃がす */
.has-fbn .ct-pagetop { bottom: 250px; }

/* スマホ・タブレット: 下の固定バー（高さ54px）の上に、小さめに出す */
@media screen and (max-width: 1180px) {
    .ct-fbn { right: 14px; bottom: 70px; width: 240px; }
    .has-fbn .ct-pagetop { bottom: 290px; }
}
@media screen and (max-width: 640px) {
    .ct-fbn { width: 200px; }
    .ct-fbn__cap { padding: 6px 10px; font-size: 11px; }
    .has-fbn .ct-pagetop { bottom: 250px; }
}
@media (prefers-reduced-motion: reduce) {
    .ct-fbn { transition: none; }
}

/* 文言: スマホは短いほう（1行に収める） */
.ct-fbn__s { display: none; }
@media screen and (max-width: 640px) {
    .ct-fbn__l { display: none; }
    .ct-fbn__s { display: inline; }
    .ct-fbn__cap { white-space: nowrap; }
}
