/* ============================================================
   campaigns.css — キャンペーン一覧（campaigns.html）
   tokens.css → base.css → page.css の次に読む
   ・ページの頭 ………… .cp-head（お知らせ一覧 legal.css の .page-head と同じ値。パンくずは page.css の .crumb）
   ・絞り込み ………… .cp-filter（legal.css の .news-filter と同じ見た目で、エリアとブランドの2段）
   ・エリアのまとまり … .cp-group
   ・店ごとのまとまり … .camp-shop 以下（top.css「開催中のキャンペーン」と同じ値を写す。top.css は読み込まない）
   ・ほかの探し方 ……… .cp-more（page.css の .golinks を使う）
   ============================================================ */

/* ================= ページの頭（夜の面） ================= */
.cp-head { position: relative; isolation: isolate; overflow: hidden; background: var(--night);
  padding: calc(76px + var(--s5)) 0 var(--s5); }
.cp-head-bg { position: absolute; inset: 0; z-index: -1; }
.cp-head-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; filter: brightness(.3); }
/* 下の一覧の地へ溶かす（色ではなく夜の地の濃さで） */
.cp-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(13, 10, 11, 0), var(--night)); }
.cp-title { margin-top: var(--s1); font-size: clamp(28px, 3.8vw, 48px); font-weight: 900; line-height: 1.25; letter-spacing: .02em; }
.cp-lead { margin-top: var(--s2); max-width: 36em; font-size: 16px; line-height: 1.8; color: var(--text-2); word-break: auto-phrase; }
.cp-lead b { font-weight: 900; color: var(--text); }
.cp-meta { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--text-3); }

@media (max-width: 1080px) {
  .cp-head { padding-top: calc(60px + var(--s4)); }
}
@media (max-width: 767px) {
  .cp-head { padding-bottom: var(--s4); }
  .cp-title { font-size: 28px; }
}

/* ================= 一覧の地 ================= */
.cp-body { padding: var(--s3) 0 var(--s6); }

/* ---------- 絞り込み（JSが無いときは出さず、全件をそのまま見せる） ---------- */
.cp-filter { display: none; gap: 12px; padding: 20px 24px; border-radius: var(--r-m); background: rgba(244, 238, 234, .035); }
.js .cp-filter { display: grid; }
.cp-fgroup { display: grid; grid-template-columns: 6em minmax(0, 1fr); align-items: start; gap: 8px 16px; }
.cp-flabel { display: flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--text-3); }
.cp-fbtns { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.cp-fbtns button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: var(--r-s); font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--text-2); white-space: nowrap;
  transition: background-color var(--t-state) ease-out, color var(--t-state) ease-out, border-color var(--t-state) ease-out; }
.cp-fbtns button:hover { background: rgba(244, 238, 234, .08); border-color: var(--text-2); color: var(--text); }
/* 選択中は面の塗りで示す（縦棒・下線・色枠は使わない） */
.cp-fbtns button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--ink); }
.cp-fbtns .num { font-weight: 500; color: var(--text-3); }
.cp-fbtns button[aria-pressed="true"] .num { color: var(--ink-3); }
/* いま開催のない条件：押せないことが分かる薄さにする（数字の0も見せる） */
.cp-fbtns button[aria-disabled="true"] { border-color: var(--line); color: rgba(244, 238, 234, .36); cursor: default; }
.cp-fbtns button[aria-disabled="true"]:hover { background: none; border-color: var(--line); color: rgba(244, 238, 234, .36); }
.cp-fbtns button[aria-disabled="true"] .num { color: rgba(244, 238, 234, .3); }
/* ブランド名：見た目は短い名前（トップの窓の短い名前と同じ）で1行に収め、読み上げは正式名 */
.cp-fbtns button { position: relative; }
.cp-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cp-status { margin: var(--s3) 0 var(--s4); font-size: 14px; color: var(--text-2); }
.cp-status b { margin-right: 2px; font-size: 18px; font-weight: 900; color: var(--text); }

.cp-empty { padding: var(--s4) 24px; border-radius: var(--r-m); background: rgba(244, 238, 234, .035); color: var(--text-2); }
.cp-empty[hidden] { display: none; }
.cp-empty .btn { margin-top: var(--s2); }

/* ---------- エリアのまとまり ---------- */
.cp-group + .cp-group { margin-top: var(--s5); }
.cp-group[hidden] { display: none; }
.cp-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: var(--s2); }
.cp-group-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; line-height: 1.3; letter-spacing: .04em; }
.cp-group-count { font-size: 14px; color: var(--text-2); }
.cp-group-count b { font-weight: 700; color: var(--text); }

/* ---------- 店ごとのまとまり（top.css と同じ値） ---------- */
/* 店ごとに、そのブランドの背景をうっすら敷く。同じ色味・雰囲気なら同じブランドと見分けられるように（片側だけの線は付けない） */
.camp-shop { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px;
  padding: 36px 40px; border-radius: var(--r-s); }
.camp-shop + .camp-shop { margin-top: 14px; }
.camp-shop[hidden] { display: none; }
.camp-shop[data-brand="eplus"]    { --shop-bg: url(../assets/stage-eplus.webp); }
.camp-shop[data-brand="otona"]    { --shop-bg: url(../assets/stage-otona.webp); }
.camp-shop[data-brand="amasado"]  { --shop-bg: url(../assets/stage-amasado.webp); }
.camp-shop[data-brand="idol"]     { --shop-bg: url(../assets/stage-idol.webp); }
.camp-shop[data-brand="ebody"]    { --shop-bg: url(../assets/stage-ebody.webp); }
.camp-shop[data-brand="hitozuma"] { --shop-bg: url(../assets/stage-hitozuma.webp); }
.camp-shop::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--shop-bg, none) 60% 50% / cover; filter: brightness(.62) saturate(1.2) blur(2px); transform: scale(1.03); }
.camp-shop::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(13,10,11,.38), rgba(13,10,11,.74) 45%, rgba(13,10,11,.8)); }
.camp-img { position: relative; align-self: start; aspect-ratio: 16 / 9; border-radius: var(--r-s); }
.camp-img-label { position: absolute; left: 12px; bottom: 12px; z-index: 3; padding: 6px 12px; border-radius: var(--r-s);
  background: rgba(13, 10, 11, .84); font-size: 15px; font-weight: 900; line-height: 1.5; letter-spacing: .04em; }
.camp-name { font-size: 22px; font-weight: 900; line-height: 1.4; margin-bottom: 12px; }
.camp-name small { display: block; font-size: 13px; font-weight: 500; color: var(--text-3); letter-spacing: .1em; }
.camp-area { margin-right: .9em; color: var(--text-2); }
.camp-items a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 20px; align-items: center; padding: 14px 16px; margin: 0 -16px; border-radius: var(--r-s); transition: background-color var(--t-state); }
.camp-items a:hover { background: rgba(244,238,234,.07); }
.ci-title { font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.ci-term { grid-row: 2; font-size: 13px; color: var(--text-3); }
.camp-items .arw { grid-column: 2; grid-row: 1 / span 2; width: 20px; height: 20px; color: var(--text-3); transition: transform var(--t-state) var(--ease-out), color var(--t-state); }
.camp-items a:hover .arw { transform: translateX(3px); color: var(--text); }

/* ================= ほかの探し方 ================= */
.cp-more { padding: 0 0 var(--s5); }
.cp-more-title { margin-bottom: var(--s3); font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; line-height: 1.3; letter-spacing: .04em; }
.cp-more .golinks { max-width: 960px; }

/* ================= 狭い画面 ================= */
/* 見出し（エリア・ブランド）を上に置き、ボタンの列を横幅いっぱいに使う（ボタンが1つだけ次の行へ落ちないように） */
@media (max-width: 1179px) {
  .cp-fgroup { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cp-flabel { min-height: 0; }
  .cp-fbtns button { padding: 0 14px; }
}
@media (max-width: 1023px) {
  .camp-shop { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 32px; padding: 28px; }
}
@media (max-width: 767px) {
  .cp-body { padding: var(--s2) 0 72px; }
  /* スマホ：条件ごとに横1列で流す（画面の端まで流すので、面は敷かない）。
     右端のボタンが画面の縁で切れて「続きがある」と分かる。いま開催のない条件（0件）は列の後ろへ回し、押せる条件を先に見せる */
  .cp-filter { gap: 8px; padding: 0; background: none; border-radius: 0; }
  .cp-fgroup { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cp-flabel { min-height: 0; }
  .cp-fbtns { flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 6px 0 6px var(--gutter);
    scroll-padding: 0 calc(var(--gutter) + 24px) 0 var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain;
    /* 右の縁で続きのボタンを薄く消す（端まで送ったら消さない） */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .cp-fbtns.is-end { -webkit-mask-image: none; mask-image: none; }
  .cp-fbtns::-webkit-scrollbar { display: none; }
  .cp-fbtns::after { content: ""; flex: 0 0 calc(var(--gutter) - 6px); order: 2; }
  .cp-fbtns button { flex: none; gap: 6px; padding: 0 12px; letter-spacing: .04em; }
  .cp-fbtns button.is-none { order: 1; }
  .cp-status { margin: var(--s2) 0 var(--s3); }
  .cp-group + .cp-group { margin-top: var(--s4); }
  .cp-group-title { font-size: 24px; }

  /* 内側の余白と矢印の列を詰め、タイトルの幅を広げて折れを減らす（2026-10-16） */
  .camp-shop { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 14px 8px; }
  .camp-shop::after { background: linear-gradient(180deg, rgba(13,10,11,.35) 0%, rgba(13,10,11,.74) 50%, rgba(13,10,11,.8)); }
  .camp-name { font-size: 20px; }
  .camp-items a { margin: 0 -6px; padding: 12px 6px; gap: 2px 8px; }
  .camp-items .arw { width: 16px; height: 16px; }

  .cp-more { padding-bottom: 72px; }
  .cp-more-title { font-size: 24px; }
}
