/* =============================================================
   scenes.css — TOPページ「活用シーン」（_scenes.html）
============================================================= */

section.scenes { /*background-color: #f7f7f8;*/ }

/* ── シーン ─────────────────────────────────────── */
/* PC・タブレット（768px以上）… グリッド表示（Swiper は動かさない） */
@media screen and (min-width: 768px) {
  #scenes_carousel .scenes-grid {
    --scenes-cols: 4;   /* ← PC の列数 */
    display: grid;
    grid-template-columns: repeat(var(--scenes-cols), minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    transform: none;
  }
  #scenes_carousel .scenes-item { width: auto; height: auto; }
  #scenes_carousel .swiper-button-prev,
  #scenes_carousel .swiper-button-next { display: none; }
}
.scenes .swiper { overflow: inherit; }
.scenes-grid { margin: 0; }
.scenes-item,
#scenes_carousel .scenes-item {   /* Swiper の .swiper-slide { display:block } に負けないように */
  --c: #ef84a5; --c-bg: #fdeef3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 26px 28px;
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .08);
}
#scenes_carousel .scenes-item.is-green, .scenes-item.is-green  { --c: #50be3d; --c-bg: #e6f6f1; }
#scenes_carousel .scenes-item.is-blue, .scenes-item.is-blue   { --c: #00ace4; --c-bg: #e6f3fc; }
#scenes_carousel .scenes-item.is-orange, .scenes-item.is-orange { --c: #ffa81d; --c-bg: #fdf1e3; }

.scenes-icon {
  display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px;
  margin: 0 0 16px;
  border-radius: 50%;
  background: var(--c);
  color: white;
  font-size: 28px;
}
.scenes-name { margin: 0 0 10px; text-align: center; font-size: 20px; font-weight: 900; line-height: 1.4; }
.scenes-text { margin: 0; width: 100%; font-size: 14px; line-height: 1.7; }

/* ── タブレット ─────────────────────────────────── */
@media screen and (min-width: 768px) and (max-width: 991px) {
  #scenes_carousel .scenes-grid { --scenes-cols: 2; }   /* ← タブレットの列数 */
}

/* ── スマホ（767px以下）… 横スクロール ───────────── */
@media screen and (max-width: 767px) {
  section.scenes .container { padding: 50px 16px 60px; }
  section.scenes .scenes-lead { margin-bottom: 32px; font-size: 14px; }
  section.scenes .scenes-carousel { position: relative; padding-bottom: 60px; }   /* 右下の矢印ボタンの場所 */
  #scenes_carousel .scenes-item { height: auto; }   /* カードの高さをそろえる */
  .scenes-item { padding: 22px 18px 20px; border-radius: 14px; }
  .scenes-icon { width: 52px; height: 52px; margin-bottom: 12px; font-size: 22px; }
  .scenes-name { margin-bottom: 8px; font-size: 15px; }
  .scenes-text { font-size: 13px; line-height: 1.7; }
}


/* =============================================================
   カードを押すと開くモーダル（_scenes.html の <dialog class="scene-modal">）
============================================================= */

/* ── カード：全体を押せるボタン + 右下の＋ ─────────── */
.scenes-item,
#scenes_carousel .scenes-item { position: relative; padding-bottom: 72px; transition: transform .2s ease, box-shadow .2s ease; }
.scenes-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}
.scenes-open:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.scenes-plus {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #e8e8ed;
  color: #333;
  font-size: 18px;
  transition: background-color .2s, color .2s, transform .2s;
}
@media (hover: hover) {
  .scenes-item:hover { transform: translateY(-3px); box-shadow: 0 10px 34px rgba(0, 0, 0, .12); }
  .scenes-item:hover .scenes-plus { background: #1d1d1f; color: #fff; transform: rotate(90deg); }
}

/* ── モーダル本体 ─────────────────────────────────── */
html.is-scene-modal-open { overflow: hidden; }   /* 開いている間、後ろのページをスクロールさせない */

.scene-modal {
  --c: #ef84a5;
  width: calc(100% - 48px);
  max-width: 880px;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.scene-modal.is-green  { --c: #50be3d; }
.scene-modal.is-blue   { --c: #00ace4; }
.scene-modal.is-orange { --c: #ffa81d; }
.scene-modal::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.scene-modal[open] { animation: scene-modal-in .28s cubic-bezier(.2, .8, .2, 1); }
.scene-modal[open]::backdrop { animation: scene-modal-fade .28s ease; }
@keyframes scene-modal-in   { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes scene-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scene-modal[open], .scene-modal[open]::backdrop { animation: none; } }

/* 中身はこの中でスクロール（×ボタンは外に置いているので、スクロールしても常に見える） */
.scene-modal-inner { max-height: calc(100dvh - 48px); overflow-y: auto; padding: 72px 96px 64px; overscroll-behavior: contain; }

.scene-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e8e8ed;
  color: #333;
  font-size: 18px;
  transition: background-color .2s;
}
.scene-modal-close:hover { background: #d8d8de; }
.scene-modal-close:focus-visible { outline: 3px solid #017aff; outline-offset: 2px; }

.scene-modal-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 17px; font-weight: 800; }
.scene-modal-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 15px;
}
.scene-modal-title { margin: 0 0 28px; font-size: 48px; font-weight: 900; line-height: 1.25; letter-spacing: -.01em; }
.scene-modal-body { margin: 0 0 1em; font-size: 15px; line-height: 1.7; }
.scene-modal-points { margin: 28px 0 0; padding: 24px 28px; border-radius: 17px; background: #f5f5f7; }
.scene-modal-points li { position: relative; padding-left: 30px; font-size: 15px; line-height: 1.7; }
.scene-modal-points li + li { margin-top: 5px; }
.scene-modal-points i { position: absolute; top: -1px; left: 0; color: var(--c); font-size: 15px; }
.scene-modal-note { margin: 16px 0 0; font-size: 13px; line-height: 1.7; color: #6e6e73; }
.scene-modal-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 28px; font-size: 15px; color: #0066cc; text-decoration: none; }
.scene-modal-link:hover { text-decoration: underline; }

/* 一番下のボタン類（コラムで詳しく読む／プランを見る） */
.scene-modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 32px; }
.scene-modal-actions .scene-modal-link { margin-top: 0; }
.scene-modal-more {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  background: #1d1d1f;
  color: #fff;
  font-size: 15px; font-weight: 700;
  text-decoration: none;
  transition: background-color .2s, transform .2s;
}
.scene-modal-more:hover { color: #fff; background: #3a3a3c; transform: translateY(-1px); }
.scene-modal-more i { color: var(--c); }
.scene-modal-more:focus-visible { outline: 3px solid #017aff; outline-offset: 2px; }

/* ── スマホ ─────────────────────────────────────── */
@media screen and (max-width: 767px) {
  .scenes-item,
  #scenes_carousel .scenes-item { padding-bottom: 60px; }
  .scenes-plus { right: 12px; bottom: 12px; width: 32px; height: 32px; font-size: 16px; }

  .scene-modal { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 22px; }
  .scene-modal-inner { max-height: calc(100dvh - 24px); padding: 64px 24px 36px; }
  .scene-modal-close { top: 14px; right: 14px; width: 38px; height: 38px; font-size: 16px; }
  .scene-modal-eyebrow { font-size: 15px; }
  .scene-modal-title { margin-bottom: 20px; font-size: 28px; }
  .scene-modal-body { font-size: 15px; }
  .scene-modal-points { padding: 18px 18px; }
  .scene-modal-points li { font-size: 14px; padding-left: 26px; }
  .scene-modal-points i { font-size: 16px; }
  .scene-modal-link { font-size: 16px; }
  .scene-modal-actions { flex-direction: column; align-items: stretch; gap: 16px; margin-top: 28px; }
  .scene-modal-more { justify-content: center; }
  .scene-modal-actions .scene-modal-link { justify-content: center; }
}
