.hcb_wrap {
  position: relative;
}

.hcb-folded {
  max-height: 280px;
  overflow: auto;
}

.hcb-unfolded {
  max-height: none;
}

.hcb-fold-controls {
  display: flex;
  gap: 8px;
  margin: 6px 0;
}

.hcb-fold-btn {
  font-size: 12px;
  cursor: pointer;
}

/* ボタンとコードが密着しすぎる時の保険 */
.hcb_wrap > pre.prism {
  margin-top: 0;
}

/* 無効ボタンの見た目 */
.hcb-fold-btn:disabled{
  opacity: .4 !important;
  cursor: not-allowed !important;
  background: #f5f5f5 !important;
  color: #999 !important;
}

/* 有効時に少し強調（任意） */
.hcb-fold-btn:not(:disabled):hover {
  opacity: 0.85;
}

/* 上部ボタンだけ */
.hcb-fold-controls[data-pos="top"] {
  position: absolute;
  top: -50px;
  right: 0;
}

/* 下部ボタンだけ */
.hcb-fold-controls[data-pos="bottom"] {
  justify-content: flex-end;
}