.cv-thumbnail img {
  cursor: pointer;
}

.cv-overlay { 
  position: fixed; inset:0; 
  background: rgba(0,0,0,0.9); 
  z-index:99999; display:none; 
  justify-content:center; 
  align-items:center; 
  padding:0; overflow:hidden; 
}

.cv-overlay.active { 
  display:flex; 
}

.cv-overlay-image { 
  max-height:90vh; object-fit:contain; 
  background:#111; margin:0; display:block; 
}

.cv-overlay-images {
  display: flex;
  direction: rtl;
  gap: 0;
  max-height: 90vh;
  max-width: 90vw;
  align-items: center;
  justify-content: center;
}

.cv-overlay-images img.cv-left,
.cv-overlay-images img.cv-right {
  max-width: 50%;  /* 見開き時は半分 */
  height: auto;
}

.cv-overlay-images img.cv-single {
  max-width: 100%;  /* 単ページのときは全幅 */
  height: auto;
  margin: 0 auto;   /* 中央寄せ */
  display: block;
}

.cv-controls { 
  position:absolute; bottom:15px; left:50%; 
  transform:translateX(-50%); display:flex; 
  padding:6px 12px; background: rgba(0,0,0,0.4); 
  border-radius:6px; align-items:center; gap:12px; 
  opacity:0; transition:opacity 0.3s; pointer-events:auto; 
  direction:rtl; z-index:99999; 
}

.cv-slider { 
  width:300px; max-width:60vw; 
  -webkit-appearance:none; appearance:none; 
  height:4px; background:#ddd; 
  border-radius:2px; cursor:pointer; 
  display:block; direction:rtl; 
}

.cv-slider::-webkit-slider-thumb, .cv-slider::-moz-range-thumb { 
  width:14px; height:14px; border-radius:50%; 
  background:#333; cursor:pointer; 
  border:2px solid white; 
}

.cv-page-indicator { 
  display:block; color:white; 
  font-size:12px; text-align:center; 
  direction:ltr; 
}

.cv-close { 
  position:absolute; top:10px; right:10px; 
  background:transparent; border:none; 
  font-size:24px; color:#888; cursor:pointer; 
  z-index:100000; transition:color 0.3s; 
}

.cv-close:hover { color:#333; }

@media (max-width:768px){ 
  .cv-controls{flex-direction:column;align-items:center;gap:6px;} 
  .cv-slider{width:80vw;} }


.cv-thumbnail-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
}

.cv-thumb {
  width: 250px;
  text-align: left;
}
.cv-thumb img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 6px;
}
.cv-title {
  font-weight: bold;
  margin: 0;
  font-size: 14px;
}
.cv-caption {
  font-size: 12px;
  color: #555;
  line-height: 1.2 !important;
  margin: 0 0 1em 0 !important;
}
.cv-single-work {
    max-width: 800px;   /* 好きな幅 */
    margin: 0 auto;     /* 左右中央 */
    text-align: center; /* タイトルやビューワーも中央寄せ */
}

.cv-single-work .article-header h2,
.cv-single-work .article-header h4 {
    margin-bottom: 1em;
}

.cv-single-work .entry-content {
    margin-top: 1em;
}

.cv-single-work .pagination.single {
    margin-top: 2em;
    text-align: center;
}

.cv-single-work .pagination.single a {
    display: inline-block;
    margin: 0 10px;
}

.cv-single-viewer-wrapper .cv-thumb  {
    text-align: center; /* 中央揃え */
    margin: 0 auto;
}

.cv-single-viewer-wrapper .cv-thumb img {
    display: inline-block; /* 中央に並べる */
}

