/* ==========================================================
   うざい広告ジェネレーター - 共通スタイルシート
   index.html / experience.html / trap.html で共有する。
   外部フォント・外部CDNは一切使用せず、システムフォントのみ。
   ========================================================== */

:root {
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-text: #222831;
  --color-text-sub: #666;
  --color-primary: #ff6b6b;
  --color-primary-dark: #e84545;
  --color-accent: #4ecdc4;
  --color-warning: #ffb703;
  --color-danger: #d90429;
  --color-border: #e0e0e0;
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --font-main: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    "Meiryo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
}

/* overflow-x は html だけに設定する。html/body 両方に設定すると
   CSSの仕様(overflow-x/overflow-yの片方が非visibleだと、もう片方の
   'visible' は 'auto' に補正される)により body 側にも overflow-y:auto
   の見えないスクロールコンテナが生まれてしまい、body配下の全ての
   position: sticky 要素(.exp-topbar 等)が効かなくなる副作用があった。
   html 側だけに絞ることで、その補正はルート要素→ビューポートへの
   伝播で吸収され、sticky はビューポート基準で正しく機能する。 */
html {
  overflow-x: hidden;
}

a {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* ---------- ヘッダー共通 ---------- */
.site-header {
  background: linear-gradient(135deg, #2b2d42, #1a1a2e);
  color: #fff;
  padding: 28px 16px;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.site-header p {
  margin: 0;
  color: #cfd2e0;
  font-size: 0.9rem;
}

/* ---------- セクション ---------- */
.section {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  margin-top: 24px;
}

.section h2 {
  margin-top: 0;
  font-size: 1.15rem;
  border-left: 6px solid var(--color-primary);
  padding-left: 10px;
}

.section-desc {
  color: var(--color-text-sub);
  font-size: 0.88rem;
  margin-top: -8px;
  margin-bottom: 16px;
}

/* ---------- 広告タイプ選択 ---------- */
.ad-type-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.ad-type-item {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.ad-type-item:has(input:checked) {
  border-color: var(--color-primary);
  background: #fff5f5;
}

.ad-type-item-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ad-type-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.ad-type-item label {
  cursor: pointer;
}

.ad-type-item .ad-type-name {
  font-weight: bold;
  display: block;
}

.preset-buttons {
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================
   広告タイプ選択カードのミニプレビュー(純CSS keyframesアニメーション)
   各カードの .ad-preview.preview--{id} 内に「ミニチュアの記事」
   (.ad-preview-article + .pv-line)を背景として置き、そのタイプ固有の
   演出要素(.pv-xxx)を重ねてループ表示する。JSでのアニメーション
   制御は行わない(生成のみ generator.js が担当)。
   ========================================================== */

.ad-preview {
  position: relative;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  background: #e4e6ec;
  isolation: isolate;
}

.ad-preview-article {
  position: absolute;
  inset: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  z-index: 1;
}

.pv-line {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #c4c8d1;
}

.pv-line:nth-child(4n + 1) {
  width: 88%;
}
.pv-line:nth-child(4n + 2) {
  width: 62%;
}
.pv-line:nth-child(4n + 3) {
  width: 78%;
}
.pv-line:nth-child(4n + 4) {
  width: 50%;
}

/* ④スティッキーは「記事だけがスクロールし続ける」演出 */
.preview--sticky .ad-preview-article {
  justify-content: flex-start;
  animation: pvLinesScroll 4s linear infinite;
}

@keyframes pvLinesScroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-46px);
  }
}

/* 汎用ミニモーダル(①popup / ③fakeClose で使用) */
.pv-modal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 46px;
  margin-left: -38px;
  margin-top: -23px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- ①ポップアップ広告プレビュー ---- */
.pv-popup-modal {
  border: 1px solid var(--color-primary);
  opacity: 0;
  transform: scale(0.4);
  animation: pvPopup 3.6s ease-in-out infinite;
}

.pv-modal-x {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 0.5rem;
  color: #999;
}

.pv-modal-label {
  font-size: 0.58rem;
  font-weight: bold;
  color: var(--color-primary-dark);
}

@keyframes pvPopup {
  0%,
  8% {
    opacity: 0;
    transform: scale(0.4);
  }
  20%,
  70% {
    opacity: 1;
    transform: scale(1);
  }
  85%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
}

/* ---- ②全面広告(インタースティシャル)プレビュー ---- */
.pv-interstitial-panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, #360033, #0b8793);
  color: #fff;
  font-size: 0.62rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  animation: pvInterstitial 3.6s ease-in-out infinite;
}

@keyframes pvInterstitial {
  0% {
    transform: translateX(100%);
  }
  20%,
  60% {
    transform: translateX(0);
  }
  80%,
  100% {
    transform: translateX(-100%);
  }
}

/* ---- ③極小・偽装×ボタンプレビュー ---- */
.pv-fakeclose-modal {
  border: 1px solid var(--color-border);
}

.pv-tiny-x {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 6px;
  height: 6px;
  font-size: 5px;
  line-height: 6px;
  color: #eee;
  background: #f2f2f2;
  border-radius: 2px;
  overflow: hidden;
}

.pv-fake-btn {
  background: var(--color-danger);
  color: #fff;
  font-size: 0.5rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  animation: pvFakeBlink 1s ease-in-out infinite;
}

@keyframes pvFakeBlink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 rgba(217, 4, 41, 0);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 8px rgba(217, 4, 41, 0.7);
  }
}

/* ---- ④追従型(スティッキー)広告プレビュー ---- */
.pv-sticky-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  z-index: 2;
  background: linear-gradient(90deg, #f7971e, #ffd200);
  color: #2b2200;
  font-size: 0.58rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- ⑤スクロール割り込み広告プレビュー ---- */
.pv-scrollinterrupt-block {
  display: block;
  height: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: #fff;
  font-size: 0.55rem;
  font-weight: bold;
  text-align: center;
  line-height: 22px;
  border-radius: 3px;
  animation: pvScrollInterrupt 3.6s ease-in-out infinite;
}

@keyframes pvScrollInterrupt {
  0%,
  25% {
    height: 0;
  }
  40%,
  75% {
    height: 22px;
  }
  90%,
  100% {
    height: 0;
  }
}

/* ---- ⑥音声付き自動再生動画広告プレビュー ---- */
.pv-video-box {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 46px;
  z-index: 2;
  background: #111;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
}

.pv-video-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  overflow: hidden;
}

.pv-video-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  animation: pvVideoProgress 3.6s linear infinite;
}

@keyframes pvVideoProgress {
  0% {
    width: 0%;
  }
  90%,
  100% {
    width: 100%;
  }
}

.pv-video-mute {
  font-size: 0.8rem;
  animation: pvMuteWiggle 1.2s ease-in-out infinite;
}

@keyframes pvMuteWiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-12deg);
  }
  75% {
    transform: rotate(12deg);
  }
}

/* ---- ⑦スキップ不可カウントダウン広告プレビュー ---- */
.pv-countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(10, 10, 20, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-num {
  position: absolute;
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-warning);
  opacity: 0;
  animation: pvCountdownNum 3s steps(1) infinite;
}

.pv-num-3 {
  animation-delay: 0s;
}
.pv-num-2 {
  animation-delay: 1s;
}
.pv-num-1 {
  animation-delay: 2s;
}

@keyframes pvCountdownNum {
  0%,
  32% {
    opacity: 1;
  }
  33%,
  100% {
    opacity: 0;
  }
}

/* ---- ⑧ホバー展開型広告プレビュー ---- */
.pv-hover-box {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 30px;
  z-index: 2;
  background: linear-gradient(160deg, #11998e, #38ef7d);
  color: #fff;
  font-size: 0.55rem;
  font-weight: bold;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: pvHoverExpand 3.6s ease-in-out infinite;
}

@keyframes pvHoverExpand {
  0%,
  20% {
    width: 34px;
  }
  45%,
  70% {
    width: 130px;
  }
  90%,
  100% {
    width: 34px;
  }
}

/* ---- ⑨擬態型インフィード広告プレビュー ---- */
.pv-infeed-list {
  position: absolute;
  inset: 8px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.pv-infeed-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 22px;
  border-radius: 4px;
  background: #d8dae0;
  padding-right: 8px;
}

.pv-infeed-ad {
  background: linear-gradient(90deg, #fff5f5, #ffe3e3);
  border: 1px dashed var(--color-primary);
  /* 最初は普通の記事行に見えて、じわっと広告だと分かる演出 */
  animation: pvInfeedReveal 3.6s ease-in-out infinite;
}

@keyframes pvInfeedReveal {
  0%,
  25% {
    background: #d8dae0;
    border-color: transparent;
  }
  45%,
  80% {
    background: linear-gradient(90deg, #fff5f5, #ffe3e3);
    border-color: var(--color-primary);
  }
  100% {
    background: #d8dae0;
    border-color: transparent;
  }
}

.pv-pr-badge {
  font-style: normal;
  font-size: 0.5rem;
  font-weight: bold;
  color: var(--color-primary-dark);
  background: #fff;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ---- ⑩強制リダイレクト広告プレビュー ---- */
.pv-cursor {
  position: absolute;
  z-index: 3;
  font-size: 0.85rem;
  color: #333;
  animation: pvCursorMove 3.6s ease-in-out infinite;
}

@keyframes pvCursorMove {
  0% {
    left: 75%;
    top: 75%;
    transform: scale(1);
  }
  35% {
    left: 45%;
    top: 45%;
    transform: scale(1);
  }
  45% {
    left: 45%;
    top: 45%;
    transform: scale(0.7);
  }
  55% {
    left: 45%;
    top: 45%;
    transform: scale(1);
  }
  100% {
    left: 75%;
    top: 75%;
    transform: scale(1);
  }
}

.pv-flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--color-danger);
  opacity: 0;
  animation: pvFlash 3.6s ease-in-out infinite;
}

@keyframes pvFlash {
  0%,
  48% {
    opacity: 0;
  }
  52%,
  60% {
    opacity: 0.85;
  }
  70%,
  100% {
    opacity: 0;
  }
}

/* ---- ⑪視聴強制ゲートプレビュー ---- */
.pv-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(15, 15, 25, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pvGateOpen 3.6s ease-in-out infinite;
}

.pv-lock {
  font-size: 1.4rem;
}

@keyframes pvGateOpen {
  0%,
  80% {
    opacity: 1;
  }
  88% {
    opacity: 0;
  }
  96%,
  100% {
    opacity: 1;
  }
}

/* ---- ⑫スワイプ広告プレビュー ---- */
/* 最初は普通の広告バナー。指が通過すると背景が黒く沈み、
   中のカードが奥へ押し込まれる */
.pv-swipead-banner {
  position: absolute;
  left: 16%;
  right: 16%;
  top: 22%;
  height: 56%;
  z-index: 1;
  border-radius: 4px;
  overflow: hidden;
  perspective: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd3dc;
  animation: pvSwipeBannerDark 4s ease-in-out infinite;
}

.pv-swipead-card {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  font-weight: bold;
  color: var(--color-primary-dark);
  transform-origin: right center;
  animation: pvSwipeCardPush 4s ease-in-out infinite;
}

/* 指が通過するタイミング(14〜34%)で背景が黒く沈む */
@keyframes pvSwipeBannerDark {
  0%,
  18% {
    background: #fff;
  }
  30%,
  44% {
    background: #000;
  }
  54%,
  100% {
    background: #fff;
  }
}

/* 最初は完全に正面向き。指の通過で奥へ押し込まれる */
@keyframes pvSwipeCardPush {
  0%,
  18% {
    transform: rotateY(0deg) translateZ(0);
    box-shadow: none;
  }
  32%,
  42% {
    transform: rotateY(-64deg) translateZ(-34px);
    box-shadow: -8px 0 14px rgba(0, 0, 0, 0.6);
  }
  54%,
  100% {
    transform: rotateY(0deg) translateZ(0);
    box-shadow: none;
  }
}

/* 指(👆)が下から上へスワイプしていく演出 */
.pv-swipead-finger {
  position: absolute;
  left: 50%;
  font-size: 1.05rem;
  z-index: 3;
  transform: translateX(-50%);
  animation: pvSwipeFinger 4s ease-in-out infinite;
}

@keyframes pvSwipeFinger {
  0%,
  6% {
    top: 92%;
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  34% {
    top: 40%;
    opacity: 1;
  }
  40%,
  100% {
    top: 40%;
    opacity: 0;
  }
}

/* 指がバナーを通過した瞬間、「別の広告ページ」に飛ばされたように
   白いページが横からスライドインしてくる */
.pv-swipead-panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #fff;
  border-top: 6px solid #dd2476;
  color: #dd2476;
  font-size: 0.52rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
  transform: translateX(100%);
  animation: pvSwipeAd 4s ease-in-out infinite;
}

@keyframes pvSwipeAd {
  0%,
  40% {
    transform: translateX(100%);
  }
  48%,
  80% {
    transform: translateX(0);
  }
  88%,
  100% {
    transform: translateX(100%);
  }
}

/* ---------- ボタン共通 ---------- */
.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: bold;
  background: var(--color-accent);
  color: #fff;
  transition: transform 0.1s, opacity 0.2s;
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-primary);
}

.btn-large {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  margin-top: 20px;
  background: linear-gradient(135deg, var(--color-primary), #ff9f43);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

/* ---------- フォーム部品 ---------- */
.form-row {
  margin-bottom: 16px;
}

.form-row label.field-label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-row input[type="text"],
.form-row textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.file-hint {
  font-size: 0.78rem;
  color: var(--color-text-sub);
  margin-top: 4px;
}

.thumb-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.thumb-row img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.radio-row {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.warning-box {
  background: #fff3cd;
  border: 1px solid var(--color-warning);
  color: #7a5b00;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 12px;
  display: none;
}

.warning-box.show {
  display: block;
}

.footer-note {
  text-align: center;
  color: var(--color-text-sub);
  font-size: 0.78rem;
  margin-top: 30px;
}

/* ==========================================================
   experience.html 専用スタイル
   ========================================================== */

.exp-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #1a1a2e;
  color: #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.78rem;
}

.exp-topbar a {
  color: #9be3ff;
  text-decoration: none;
}

.exp-article {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  margin: 20px auto;
  max-width: 760px;
  position: relative;
}

.exp-article h1 {
  font-size: 1.5rem;
  margin-top: 0;
}

.exp-article p {
  margin: 0 0 18px;
}

.exp-layout {
  display: flex;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px;
  align-items: flex-start;
}

.exp-main-col {
  flex: 1;
  min-width: 0;
}

.exp-side-col {
  width: 160px;
  flex-shrink: 0;
  position: sticky;
  top: 50px;
}

/* ホバー展開広告が未選択のときは空の列を消して記事を中央に */
.exp-side-col:empty {
  display: none;
}

@media (max-width: 780px) {
  .exp-layout {
    flex-direction: column;
  }
  .exp-side-col {
    width: 100%;
    position: static;
  }
}

/* ---- 開始オーバーレイ(ユーザージェスチャ取得用) ---- */
.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: linear-gradient(135deg, #16213e, #0f3460);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.start-overlay h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.start-overlay p {
  color: #cfd2e0;
  margin-bottom: 24px;
  max-width: 420px;
}

/* ---- 汎用モーダル(ポップアップ/偽×/全面広告共通の土台) ---- */
.ad-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 16px;
}

.ad-modal-box {
  background: #fff;
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 22px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.ad-modal-box .ad-label {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 0.6rem;
  color: #bbb;
}

.ad-creative-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

.ad-creative-title {
  font-weight: bold;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.ad-creative-desc {
  font-size: 0.88rem;
  color: var(--color-text-sub);
  margin-bottom: 14px;
}

.ad-cta-btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 10px 26px;
  font-weight: bold;
  font-size: 0.95rem;
}

/* 本物の×(小さく背景に同化) */
.real-close-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border: none;
  background: #f4f4f4;
  color: #f4f4f4;
  font-size: 6px;
  line-height: 8px;
  padding: 0;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.real-close-btn:hover {
  background: #ccc;
  color: #555;
}

/* 偽の×(目立つ) */
.fake-close-btn {
  display: block;
  margin: 10px auto 0;
  background: var(--color-danger);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  width: 100%;
}

/* ---- 全面広告(インタースティシャル) ---- */
.interstitial-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: linear-gradient(135deg, #360033, #0b8793);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 20px;
}

.interstitial-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid #fff;
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

/* ---- 追従型スティッキー広告 ---- */
.sticky-ad {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 15vh;
  min-height: 90px;
  background: linear-gradient(90deg, #f7971e, #ffd200);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
}

.sticky-ad.hidden {
  transform: translateY(110%);
}

.sticky-ad-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2b2200;
  overflow: hidden;
}

.sticky-ad-close {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* ---- スクロール割り込み広告 ---- */
.scroll-ad-slot {
  height: 0;
  overflow: hidden;
  transition: height 0.6s ease;
  border-radius: 10px;
  margin: 0;
}

.scroll-ad-slot.expanded {
  height: 300px;
  margin: 18px 0;
}

.scroll-ad-inner {
  height: 100%;
  width: 100%;
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
  padding: 10px;
}

/* ---- 音声付き自動再生動画広告(疑似動画) ---- */
.video-ad-box {
  position: relative;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
  color: #fff;
  text-align: center;
  padding: 30px 16px;
}

.video-ad-fake-screen {
  height: 140px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: linear-gradient(270deg, #ff6b6b, #4ecdc4, #ffd93d, #ff6b6b);
  background-size: 400% 400%;
  animation: videoAdGradient 6s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

@keyframes videoAdGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.video-ad-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.video-ad-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
}

.video-ad-mute {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid #fff;
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
}

/* ---- スキップ不可カウントダウン広告/視聴強制ゲート 共通 ---- */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(10, 10, 20, 0.94);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.gate-in-article {
  position: absolute;
  z-index: 200;
  background: rgba(15, 15, 25, 0.96);
  /* 記事全体(縦に長い)を覆うため、中央寄せをやめてブロックにする。
     中身は .gate-inner がスクロールに追従して常に見える位置に出る。 */
  display: block;
  padding: 0;
}

.gate-in-article .gate-inner {
  position: sticky;
  top: 22vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
}

.gate-countdown {
  font-size: 2.2rem;
  font-weight: bold;
  margin: 14px 0;
  color: var(--color-warning);
}

.gate-skip-btn {
  margin-top: 10px;
  padding: 12px 28px;
  border-radius: 30px;
  border: none;
  font-weight: bold;
}

.gate-skip-btn:disabled {
  background: #555;
  color: #999;
  cursor: not-allowed;
}

.gate-skip-btn:not(:disabled) {
  background: var(--color-accent);
  color: #fff;
}

/* ---- ホバー展開型広告 ---- */
.hover-ad {
  position: relative;
  z-index: 260; /* 展開時に記事の上に覆いかぶさる */
  width: 100%;
  min-height: 220px;
  border-radius: 10px;
  background: linear-gradient(160deg, #11998e, #38ef7d);
  color: #fff;
  padding: 14px;
  text-align: center;
  transition: width 0.4s ease, transform 0.4s ease, min-height 0.4s ease;
  cursor: pointer;
  overflow: hidden;
}

/* サイドバーは画面右側にあるため、右端を固定したまま「左方向」へ
   展開させる(右に広げると画面外にはみ出して見切れてしまう)。
   translateXの100%は自身の展開後の幅を指すので、
   「左へ(幅 - 元の160px)ぶん」ずらすと右端の位置が変わらない。 */
.hover-ad.expanded {
  width: min(70vw, 700px);
  min-height: 420px;
  transform: translateX(calc(160px - 100%));
}

@media (max-width: 780px) {
  /* モバイルではサイドバーが全幅・記事の下になるため、ずらさずその場で拡大 */
  .hover-ad.expanded {
    width: 100%;
    transform: none;
  }
}

/* ---- スワイプ広告 ---- */
/* 記事に挿入される、一見無害な普通のインライン広告バナー */
/* 通常時は黒枠なしの、他と同じ「普通のインライン広告」。
   スワイプが通ると背景が黒く沈み(.pushing)、カードが
   rotateY/translateZで奥へ押し込まれていき、押し込みきると発動する */
.swipead-banner {
  position: relative;
  height: 300px;
  margin: 20px 0;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fff;
  overflow: hidden;
  perspective: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease;
  /* バナー上のタッチをブラウザのスクロールに使わせない
     (スクロールの動きを広告が乗っ取る) */
  touch-action: none;
}

.swipead-banner.pushing {
  background: #000;
  border-color: #000;
}

.swipead-tag {
  position: absolute;
  top: 6px;
  left: 10px;
  z-index: 3;
  font-size: 0.6rem;
  color: #bbb;
}

/* 本物っぽさ演出のAdChoices風アイコン(飾り。押せない) */
.swipead-adchoices {
  position: absolute;
  top: 5px;
  right: 8px;
  z-index: 3;
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: #4a9fd8;
  pointer-events: none;
}

.swipead-card {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  text-align: center;
  transform-origin: right center;
  /* 最初は完全にまっすぐ。スワイプが通るとJSがtransformを与える */
  transition: transform 0.25s ease-out, box-shadow 0.25s ease;
  will-change: transform;
}

.swipead-banner.pushing .swipead-card {
  box-shadow: -24px 0 50px rgba(0, 0, 0, 0.65);
}

.swipead-card-img {
  max-height: 55%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .swipead-banner {
    height: 260px;
  }
}

/* ==========================================================
   swipe-lp.html(スワイプ広告の飛び先=偽の広告ランディングページ)
   ========================================================== */

.swipelp-notice {
  background: #fff3cd;
  color: #7a5b00;
  text-align: center;
  font-size: 0.78rem;
  padding: 8px 14px;
}

.swipelp-header {
  background: linear-gradient(90deg, #ff512f, #dd2476);
  color: #fff;
  text-align: center;
  padding: 14px;
  font-weight: bold;
  letter-spacing: 1px;
}

.swipelp-body {
  max-width: 520px;
  margin: 0 auto;
  padding: 30px 20px 60px;
  text-align: center;
}

.swipelp-emoji {
  font-size: 5rem;
  margin: 10px 0;
}

.swipelp-img {
  max-height: 240px;
  margin: 10px auto;
  border-radius: 10px;
}

.swipelp-price {
  margin: 18px 0;
  font-size: 1.1rem;
}

.swipelp-price .old {
  text-decoration: line-through;
  color: #999;
  margin-right: 10px;
}

.swipelp-price .new {
  color: var(--color-danger);
  font-size: 1.9rem;
  font-weight: bold;
  animation: swipelpBlink 0.9s steps(1) infinite;
}

@keyframes swipelpBlink {
  0%,
  59% {
    opacity: 1;
  }
  60%,
  100% {
    opacity: 0.35;
  }
}

.swipelp-stock {
  font-size: 0.82rem;
  color: var(--color-danger);
  font-weight: bold;
  margin-bottom: 18px;
}

.swipelp-cta {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 14px;
  background: linear-gradient(90deg, #ff512f, #dd2476);
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: bold;
  box-shadow: 0 6px 18px rgba(221, 36, 118, 0.45);
}

.swipelp-back {
  display: inline-block;
  margin-top: 18px;
  color: var(--color-text-sub);
  font-size: 0.85rem;
}

/* ---- 擬態型インフィード広告 ---- */
.recommend-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.recommend-item {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  display: block;
  background: #fafafa;
}

.recommend-item .recommend-thumb {
  height: 90px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ccc, #eee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.recommend-item .recommend-title {
  font-size: 0.88rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.recommend-item .pr-tag {
  font-size: 0.66rem;
  color: #bbb;
}

/* ==========================================================
   trap.html 専用スタイル
   ========================================================== */

.trap-disclaimer {
  background: #fff3cd;
  color: #7a5b00;
  border-bottom: 3px solid var(--color-warning);
  padding: 14px 16px;
  text-align: center;
  font-weight: bold;
  font-size: 0.92rem;
}

.trap-body {
  background: #1a0000;
  color: #ff4d4d;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.trap-warning-icon {
  font-size: 4rem;
  animation: trapBlink 1s steps(1) infinite;
}

@keyframes trapBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.25;
  }
}

.trap-body h1 {
  color: #ff4d4d;
  font-size: 1.6rem;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.7);
}

.trap-body p {
  max-width: 480px;
  color: #ffb3b3;
}

.trap-back-btn {
  margin-top: 24px;
  background: #fff;
  color: #1a0000;
  border: none;
  border-radius: 8px;
  padding: 12px 26px;
  font-weight: bold;
  font-size: 1rem;
}
