/* Affiliate CTA 2.1.0  色は設定（--afcta-btn-bg など）から */
.afcta-bar,.afcta-bar *,.afcta-modal,.afcta-modal *,.afcta-card,.afcta-card *{box-sizing:border-box}
.afcta-bar{position:fixed;left:0;right:0;bottom:0;z-index:100;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:var(--afcta-bar-bg,#fff);box-shadow:0 -2px 12px rgba(0,0,0,.12);transform:translateY(110%);transition:transform .25s ease;pointer-events:none}
.afcta-bar.is-on{transform:none;pointer-events:auto}
.afcta-sub{display:block;font-size:12px;line-height:1.4;color:#555;text-align:center}
.afcta-btn{display:flex;align-items:center;justify-content:center;gap:.4em;width:100%;max-width:520px;min-height:48px;padding:10px 16px;border-radius:999px;background:var(--afcta-btn-bg,#b85f14);color:var(--afcta-btn-color,#fff)!important;font-weight:700;font-size:16px;line-height:1.3;text-align:center;text-decoration:none!important;box-shadow:0 3px 0 rgba(0,0,0,.18);transition:transform .15s ease,filter .15s ease}
.afcta-btn::after{content:"";width:.5em;height:.5em;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg);flex:none}
.afcta-btn:hover{filter:brightness(1.06);transform:translateY(-1px)}
.afcta-btn:focus-visible,.afcta-close:focus-visible,.afcta-later:focus-visible{outline:3px solid #1a73e8;outline-offset:2px}
/* SWELL の「ページの上へ」ボタンなどを、帯の上へよける */
body.afcta-has-bar .p-fixBtnWrap{bottom:calc(84px + env(safe-area-inset-bottom))!important;transition:bottom .25s ease}
body.afcta-has-bar{padding-bottom:0}

/* PC：離脱時の案内 */
.afcta-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px}
.afcta-modal[hidden],.afcta-card[hidden]{display:none}
.afcta-overlay{position:absolute;inset:0;background:rgba(0,0,0,.45);opacity:0;transition:opacity .2s ease}
.afcta-modal.is-on .afcta-overlay{opacity:1}
.afcta-panel{position:relative;width:min(480px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:28px 24px 18px;border-radius:14px;background:#fff;box-shadow:0 12px 40px rgba(0,0,0,.25);transform:translateY(12px);opacity:0;transition:transform .2s ease,opacity .2s ease}
.afcta-modal.is-on .afcta-panel{transform:none;opacity:1}
.afcta-title{margin:0 0 8px;font-size:18px;font-weight:700;line-height:1.5;color:#333}
.afcta-text{margin:0 0 12px;font-size:14px;line-height:1.7;color:#444}
.afcta-points{margin:0 0 14px;padding:10px 12px 10px 30px;border-radius:8px;background:#f6f7f8;font-size:14px;line-height:1.7;color:#333}
.afcta-points li{margin:0;list-style:"✓ ";padding-left:.2em}
.afcta-panel .afcta-sub,.afcta-card .afcta-sub{margin:0 0 4px}
.afcta-close{position:absolute;top:6px;right:8px;width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:#666;font-size:22px;line-height:1;cursor:pointer}
.afcta-close:hover{background:#f0f0f0}
.afcta-later{display:block;margin:10px auto 0;padding:6px 10px;border:0;background:transparent;color:#666;font-size:13px;text-decoration:underline;cursor:pointer}

/* 案内の中の広告の画像（2.1.0）。大きさは画像のまま、はみ出すときだけ縮める */
.afcta-bn-slot:empty{display:none}
.afcta-bn-slot{margin:4px 0 12px;text-align:center;line-height:0}
.afcta-bn-slot a{display:inline-block;max-width:100%;border-radius:6px;overflow:hidden;box-shadow:0 1px 6px rgba(0,0,0,.12)}
.afcta-bn-slot img{display:block;max-width:100%;height:auto;margin:0 auto}
.afcta-bn-slot img[width="1"],.afcta-bn-slot img[height="1"]{position:absolute;width:1px!important;height:1px!important;opacity:0;pointer-events:none}
.afcta-card .afcta-bn-slot{margin:2px 0 8px}
.afcta-card .afcta-bn-slot img{max-height:80px;width:auto}
/* スマホのカードで画像を出すときは、長い文を隠して確かめどころとボタンを残す（ボタンが画面の外へ出ないように） */
.afcta-card.is-banner .afcta-text,.afcta-card.is-banner .afcta-sub,.afcta-card.is-tight .afcta-points{display:none}

/* スマホ：読み終わりのカード（画面の下に小さく。ふさがない） */
.afcta-card{position:fixed;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));z-index:1000;max-height:45vh;overflow:auto;padding:16px 14px 14px;border-radius:14px;background:#fff;box-shadow:0 -4px 24px rgba(0,0,0,.22);transform:translateY(120%);transition:transform .25s ease}
.afcta-card.is-on{transform:none}
.afcta-card .afcta-title{font-size:15px;padding-right:28px}
.afcta-card .afcta-text{font-size:13px;margin-bottom:8px}
.afcta-card .afcta-points{font-size:13px;padding:8px 10px 8px 26px;margin-bottom:10px}

@media (min-width:960px){
  .afcta-bar{flex-direction:row;justify-content:center;gap:16px}
  .afcta-btn{width:auto;min-width:320px}
}
@media (prefers-reduced-motion:reduce){
  .afcta-bar,.afcta-btn,.afcta-panel,.afcta-overlay,.afcta-card{transition:none}
}
