/* アフィリエイト広告：公開ページの表示（ads.js）用 */

/* ===== 公開ページの広告 ===== */
.pattern-ad-frame { display: block; max-width: 100%; border: 0; background: transparent; }
.pattern-ad-label { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #00000099; color: #fff; font-size: 11px; line-height: 1.5; }

/* PC：常時表示（右下に固定・フッターメニューの上） */
.pattern-ad-fixed { position: fixed; z-index: 30; right: 16px; bottom: calc(var(--ad-bottom-nav, 0px) + 12px); display: grid; gap: 4px; justify-items: end; max-width: min(336px, 40vw); padding: 6px; border-radius: 10px; background: #ffffffee; box-shadow: 0 4px 18px #00000026; }
.pattern-ad-fixed .pattern-ad-frame { max-height: 45vh; }

/* 全面表示 */
.pattern-ad-overlay { position: fixed; z-index: 1000; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px 0; background: #000000a6; }
.pattern-ad-overlay.is-sp { bottom: var(--ad-bottom-nav, 0px); align-items: flex-end; padding: 0 0 10px; }
.pattern-ad-full-panel { position: relative; display: grid; gap: 6px; justify-items: center; max-width: 90vw; max-height: 100%; padding: 12px; border-radius: 12px; background: #fff; box-shadow: 0 8px 32px #00000059; box-sizing: border-box; }
.pattern-ad-full-panel .pattern-ad-label { justify-self: start; }
.pattern-ad-close { position: absolute; z-index: 1; top: -18px; right: -14px; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #333; color: #fff; font-size: 30px; font-weight: 700; line-height: 1; box-shadow: 0 2px 10px #00000066; cursor: pointer; }
.pattern-ad-close:hover, .pattern-ad-close:focus-visible { background: #000; outline: 3px solid #f1be5b; outline-offset: 2px; }
@media (max-width: 760px) {
  .pattern-ad-close { width: 52px; height: 52px; top: -22px; right: -8px; font-size: 32px; }
}
