/* =========================
   yb_ Grid
   ========================= */
.yb_contents_wrapper{
  width: min(1100px, 100%);
  margin: 18px auto;
  padding: 14px;
  box-sizing: border-box;
}

/* --- Text Box --- */
.yb_text_wrapper{
  padding: 18px;
}
.yb_text{
  font-size: 16px;
  line-height: 1.7;
  color: #1f2937;
  word-break: break-word;
  white-space: pre-wrap;
}

.yb_grid_wrapper{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.yb_grid_entry{
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f4f6;
  aspect-ratio: 4 / 3;
  position: relative;
}

.yb_grid_entry img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}

.yb_grid_entry:hover img{
  transform: scale(1.06);
}

/* 숨김 텍스트(레이아웃에서 숨김) */
.yb_hidden_meta{
  display: none;
}

/* =========================
   Popup Layer
   ========================= */
.yb_popup_layer{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.yb_popup_layer.yb_active{
  display: block;
}

.yb_popup_overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
}

.yb_popup_panel{
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(94vw, 1100px);
  height: min(92vh, 760px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.yb_popup_close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: #111;
  font-size: 22px;
  cursor: pointer;
  text-align: center;
}

.yb_popup_body{
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 0;
  height: 100%;
}

.yb_popup_media{
  background: #0b0b0b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.yb_popup_image{
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  display: block;
  background: #000;
}

.yb_popup_info{
  padding: 18px 18px 18px 18px;
  overflow: auto;
}

.yb_popup_title{
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: #111;
  margin: 2px 0 8px 0;
}

.yb_popup_artist{
  font-size: 14px;
  font-weight: 700;
  color: rgba(17,17,17,.75);
  margin: 0 0 14px 0;
}

.yb_popup_desc{
  font-size: 14px;
  line-height: 1.75;
  color: #222;
  white-space: pre-wrap;
  margin: 0 0 14px 0;
}

.yb_popup_bio{
  font-size: 13px;
  line-height: 1.7;
  color: rgba(0,0,0,.72);
  white-space: pre-wrap;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 12px;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px){
  .yb_grid_wrapper{ grid-template-columns: repeat(2, 1fr); }

  .yb_popup_body{
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .yb_popup_panel{
    height: min(94vh, 900px);
  }

  .yb_popup_media{
    padding: 12px;
  }
}

@media (max-width: 560px){
  .yb_grid_wrapper{ grid-template-columns: 1fr; }
  .yb_popup_panel{
    width: 94vw;
    border-radius: 14px;
  }
}