/* =========================================================
   BP CORE — CAST
   Public CAST cards and /cast/{slug}/ profile pages.
   ========================================================= */

:root{
  --bp-cast-page-bg:#000000;
  --bp-cast-surface:#000000;
  --bp-cast-surface-alt:#111111;
  --bp-cast-text:var(--demma-text,#ffffff);
  --bp-cast-muted:var(--demma-muted,#c8c8c8);
  --bp-cast-primary:var(--demma-primary,#e61673);
  --bp-cast-primary-hover:var(--demma-primary-hover,#e58ba3);
  --bp-cast-border:rgba(255,255,255,.14);
  --bp-cast-radius:4px;
}

/* Mesmerize/legacy clearfix pseudo-elements must not become Grid items. */
.bp-cast-grid::before,
.bp-cast-grid::after,
.bp-cast-profile::before,
.bp-cast-profile::after,
.bp-cast-profile__figure::before,
.bp-cast-profile__figure::after,
.bp-cast-profile__caption::before,
.bp-cast-profile__caption::after,
.bp-cast-profile__social::before,
.bp-cast-profile__social::after,
.bp-cast-profile__reservations::before,
.bp-cast-profile__reservations::after{
  content:none!important;
  display:none!important;
}

/* ---------- Single CAST page ---------- */
body.bp-core-cast-single{
  background:#000!important;
}

/* CAST個別ページはテーマ側の #0a0a0a 等を引き継がず、ページ背景を純黒に統一。 */
body.bp-core-cast-single #page,
body.bp-core-cast-single #content,
body.bp-core-cast-single .page-content,
body.bp-core-cast-single main.site-main{
  background:#000!important;
}

body.bp-core-cast-single .bp-cast-page{
  display:block;
  width:100%;
  margin:0;
  padding:48px 20px 64px;
  background:var(--bp-cast-page-bg);
  color:var(--bp-cast-text);
  box-sizing:border-box;
}

body.bp-core-cast-single .bp-cast-page__inner{
  width:100%;
  max-width:640px;
  margin:0 auto;
  padding:0;
  box-sizing:border-box;
}

.bp-cast-profile{
  width:100%;
  margin:0 auto;
  padding:0;
  color:var(--bp-cast-text);
  background:var(--bp-cast-surface);
  border:0;
  border-radius:0;
  overflow:hidden;
  box-sizing:border-box;
  text-align:center;
}

.bp-cast-profile__figure{
  width:100%;
  margin:0!important;
  padding:0!important;
  background:#000;
}

.bp-cast-profile__image{
  width:100%;
  margin:0;
  padding:0;
  background:#000;
}

.bp-cast-profile__image img{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}

.bp-cast-profile__caption{
  position:relative;
  width:100%;
  margin:0;
  padding:20px 18px 24px;
  background:#000!important;
  border-top:0;
  box-sizing:border-box;
  text-align:center;
}

/* テーマ由来の半透明オーバーレイ／opacity をCAST情報部では無効化。 */
.bp-cast-profile__caption{
  opacity:1!important;
  filter:none!important;
  -webkit-filter:none!important;
  isolation:isolate;
  z-index:2;
}
.bp-cast-profile__caption > *{
  position:relative;
  z-index:2;
  opacity:1!important;
  filter:none!important;
  -webkit-filter:none!important;
}
.bp-cast-profile__social a{
  opacity:1!important;
  filter:none!important;
  -webkit-filter:none!important;
}

.bp-cast-profile__caption::before{
  content:""!important;
  display:block!important;
  position:absolute;
  left:0;
  right:0;
  top:-2px;
  width:auto!important;
  height:2px;
  background:linear-gradient(90deg,#ff2400,#ff006e,#e8b71d,#1de840,#1ddde8,#2b1de8,#dd00f3);
  background-size:400% 100%;
  animation:bp-cast-rainbow 18s ease infinite;
}

@keyframes bp-cast-rainbow{
  0%{background-position:0 50%}
  50%{background-position:100% 50%}
  100%{background-position:0 50%}
}

.bp-cast-profile__role{
  margin:0 0 6px;
  color:var(--bp-cast-muted);
  font-size:13px;
  font-weight:700;
  line-height:1.4;
  letter-spacing:.12em;
  text-transform:none;
  text-align:center;
}

.bp-cast-profile__name{
  margin:0!important;
  padding:0!important;
  color:var(--bp-cast-text)!important;
  font-family:inherit!important;
  font-size:30px!important;
  font-style:normal!important;
  font-weight:900!important;
  line-height:1.2!important;
  letter-spacing:.05em!important;
  text-align:center!important;
  text-shadow:none!important;
}

.bp-cast-profile__social{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:8px;
  width:100%;
  margin:18px 0 0;
  padding:0;
}

.bp-cast-profile__social a,
.bp-cast-profile__dj-request-link,
.bp-cast-profile__reservation>a{
  display:flex!important;
  align-items:center;
  justify-content:center;
  min-height:48px;
  margin:0!important;
  padding:11px 14px!important;
  box-sizing:border-box;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:var(--bp-cast-primary)!important;
  border:1px solid var(--bp-cast-primary)!important;
  border-radius:var(--bp-cast-radius)!important;
  font-size:15px!important;
  font-weight:800!important;
  line-height:1.35!important;
  letter-spacing:.02em!important;
  text-align:center!important;
  text-decoration:none!important;
  transition:background-color .2s ease,border-color .2s ease,transform .2s ease!important;
}

.bp-cast-profile__social a:hover,
.bp-cast-profile__social a:focus,
.bp-cast-profile__dj-request-link:hover,
.bp-cast-profile__dj-request-link:focus,
.bp-cast-profile__reservation>a:hover,
.bp-cast-profile__reservation>a:focus{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:var(--bp-cast-primary-hover)!important;
  border-color:var(--bp-cast-primary-hover)!important;
  transform:translateY(-1px);
  text-decoration:none!important;
}

.bp-cast-profile__dj-request{width:100%;margin:8px 0 0;padding:0}.bp-cast-profile__dj-request-link{width:100%}

.bp-cast-profile__bio{
  width:100%;
  margin:0!important;
  padding:22px 24px 24px;
  box-sizing:border-box;
  background:var(--bp-cast-surface);
  border-top:0;
  color:var(--bp-cast-text);
  text-align:left;
}

.bp-cast-profile__bio p{
  margin:0 0 14px!important;
  color:var(--bp-cast-text)!important;
  font-size:15px!important;
  font-weight:500!important;
  line-height:1.85!important;
  text-align:left!important;
}
.bp-cast-profile__bio p:last-child{margin-bottom:0!important}

.bp-cast-profile__reservations{
  width:100%;
  margin:0!important;
  padding:24px;
  box-sizing:border-box;
  background:var(--bp-cast-surface);
  border-top:0;
}

.bp-cast-profile__reservation{
  width:100%;
  margin:0;
  padding:0;
}
.bp-cast-profile__reservation+.bp-cast-profile__reservation{margin-top:10px}

.bp-cast-profile__reservation p{
  margin:7px 2px 0!important;
  color:var(--bp-cast-muted)!important;
  font-size:12px!important;
  line-height:1.6!important;
  text-align:left!important;
}

/* ---------- CAST grid shortcode ---------- */
.bp-cast-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:24px;
  width:100%;
  margin:0;
  padding:0;
  box-sizing:border-box;
}
.bp-cast-grid.is-single{
  grid-template-columns:minmax(0,420px);
}

.bp-cast-card{
  width:100%;
  margin:0;
  padding:0;
  overflow:hidden;
  background:var(--bp-cast-surface);
  border:1px solid var(--bp-cast-border);
  border-radius:var(--bp-cast-radius);
  box-sizing:border-box;
}

.bp-cast-card__link{
  display:block!important;
  color:inherit!important;
  text-decoration:none!important;
}

.bp-cast-card__image img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
}

.bp-cast-card__caption{
  position:relative;
  padding:14px 16px 16px;
  text-align:center;
}
.bp-cast-card__caption::before{
  content:""!important;
  display:block!important;
  position:absolute;
  left:0;
  right:0;
  top:0;
  width:auto!important;
  height:2px;
  background:linear-gradient(90deg,#ff2400,#ff006e,#e8b71d,#1de840,#1ddde8,#2b1de8,#dd00f3);
}
.bp-cast-card__role{
  color:var(--bp-cast-muted);
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
}
.bp-cast-card__name{
  margin-top:3px;
  color:var(--bp-cast-text);
  font-size:20px;
  font-weight:900;
  letter-spacing:.04em;
}

@media (max-width:767px){
  body.bp-core-cast-single .bp-cast-page{padding:28px 14px 42px}
  body.bp-core-cast-single .bp-cast-page__inner{max-width:560px}
  .bp-cast-profile__caption{padding:18px 14px 20px}
  .bp-cast-profile__name{font-size:26px!important}
  .bp-cast-profile__social{grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:7px;margin-top:16px}
  .bp-cast-profile__social a,.bp-cast-profile__reservation>a{min-height:46px;padding:10px 11px!important;font-size:14px!important}
  .bp-cast-profile__bio,.bp-cast-profile__reservations{padding:20px 16px}
  .bp-cast-grid{grid-template-columns:minmax(0,1fr);gap:20px}
  .bp-cast-grid.is-single{grid-template-columns:minmax(0,1fr)}
}

@media (prefers-reduced-motion:reduce){
  .bp-cast-profile__caption::before{animation:none}
  .bp-cast-profile__social a,
  .bp-cast-profile__reservation>a{transition:none!important}
}
