.cd-modal-overlay {
  background: rgba(0, 0, 0, .85);
}

.cd-modal-content {
  background-image:
    linear-gradient(rgba(234, 234, 234, 0.7), rgba(234, 234, 234, 0.7)),
    url('../../VIVANT/img/vivant_bg.svg');
  background-color: #EAEAEA;
  border-radius: 1rem;
  width: calc(100% - 130px);
  max-width: 1080px;
  max-height: 90vh;
  padding: 4rem clamp(50px, 7vw, 90px);
  color: #000;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.cd-modal-body {
  overflow-y: auto;
  min-height: 0;
}

.cd-modal-close {
  position: absolute;
  z-index: 1;
  top: 0;
  right: -5rem;
  background: none;
  border: none;
  line-height: 1;
  cursor: pointer;
  transition: .5s ease-in-out;
}
.cd-modal-close img {
  display: block;
  width: auto;
  height: 4rem;
  filter: brightness(0) invert(1);
}
.cd-modal-close:hover {
  opacity: .6;
}

/* コンテンツ側（<template id="cd-modal-{id}">）に入れるクラス */
.board-popup-main {
  display: grid;
  grid-template-columns: 10fr 7fr;
  gap: clamp(1rem, 4vw, 5rem);
  align-items: center;
}

.board-popup-img-wrap {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
}
.board-popup-img {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.board-popup-info {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 5rem);
  justify-content: center;
}

.board-popup-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.8;
  font-weight: bold;
}

.board-popup-desc {
  margin: 0;
  line-height: 1.8;
  white-space: pre-wrap;
}

.board-popup-link-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.board-popup-link-btn {
  background: #D71718;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 1.8rem 1.25rem;
  border-radius: .4rem;
  font-size: 1.6rem;
  font-weight: bold;
  transition: .5s ease-in-out;
  display: flex;
  gap: .8rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
  box-sizing: border-box;
}
.board-popup-link-btn:hover {
  opacity: .6;
}

.board-popup-link-note {
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

@media (max-width: 767px) {
  .cd-modal-content {
    padding: 6vw 4vw;
    width: 95%;
    margin: 50px 0;
  }

  .board-popup-main {
    grid-template-columns: 1fr;
    gap: clamp(8px, 2.5vw, 20px);
    margin-bottom: 2.4rem;
  }

  .board-popup-title,
  .board-popup-desc {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    line-height: 1.5;
  }

  .board-popup-link-btn {
    padding: 1.4rem 1rem;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  }

  .cd-modal-close {
    top: -50px;
    right: 0;
  }
  .cd-modal-close img {
    height: 3.2rem;
  }
}


/* haishin用 top.cssのstyleを上書き */
.cd-modal-content:has(#contents){
  padding: 0;
}
#contents.board-stream-panel {
  background: none;
  padding: 0;
}
#contents.board-stream-panel p {
  color: #000;
}
#contents.board-stream-panel .title img {
  content: url('../img/board_stream.svg');
}
@media (min-width: 768px) {
  #contents.board-stream-panel .stream {
    margin: 4rem auto;
  }
  #contents.board-stream-panel .txt_gx {
    padding-bottom: 4rem;
  }
}

/* */
